Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement no_std support #1

Merged
merged 9 commits into from
Feb 2, 2018
Merged

Implement no_std support #1

merged 9 commits into from
Feb 2, 2018

Conversation

vks
Copy link
Contributor

@vks vks commented Feb 2, 2018

  • Unfortunately, some functionality from core had to be vendored, because it is not exposed by stable Rust. Hopefully this functionality will be in the num_traits crate version 0.2. This would allow deleting the newly added traits.
  • The code taken from Rust is MPL/Apache licensed. I think the BSD license is more permissive? I would suggest to relicense this crate under MPL/Apache, to reduce friction with the Rust ecosystem. Alternatively, the BasicFloat could be implemented in a separate crate with a separate license, or we just wait until its functionality is provided by num_traits.

vks added 4 commits February 2, 2018 14:12
Unfortunately, some functionality from `core` had to be vendored,
because it is not exposed on stable. Hopefully this functionality will
be in the `num_traits` crate version 0.2. This would allow deleting the
newly added traits.
The tests that were only using the public interface were moved to the
tests directory, were they can used `std` features. A print statement in
a private test had to be commented out, so it works on no_std.
@Eh2406
Copy link
Owner

Eh2406 commented Feb 2, 2018

Thank you so much! This is a really good improvement! Are you using my project for something!?

The code is BSD because it is derived from previous work that is BSD. If I re-license under MPL/Apache do I need to get permission from the persons I derived it from?

Does this compile on rust 1.0.0? If not what is the oldest version this works on? I rashly decided in my readme that changing minimum rust version is a breaking change. Which may be worth doing, but does require some care.

@vks
Copy link
Contributor Author

vks commented Feb 2, 2018

Are you using my project for something!?

Not yet, but I might in the future. :) I want to have some way to do numerical integration on crates.io, so I'm interested in your crate. (I'll probably work on bindings or a port for cuba to have something for multidimensional integration.)

The code is BSD because it is derived from previous work that is BSD. If I re-license under MPL/Apache do I need to get permission from the persons I derived it from?

I'm not so sure myself. This blog post seems to suggest that it is possible to relicense BSD code as MPL/Apache (but not the other way around).

Does this compile on rust 1.0.0? If not what is the oldest version this works on? I rashly decided in my readme that changing minimum rust version is a breaking change. Which may be worth doing, but does require some care.

Unfortunately not, the minimum version required by num-traits is 1.8. I'll see whether I can get rid of the dependency.

@vks
Copy link
Contributor Author

vks commented Feb 2, 2018

Removing the num_traits dependency gives me problems with f64::ln. It cannot be easily accessed with no_std on stable. :(

@Eh2406
Copy link
Owner

Eh2406 commented Feb 2, 2018

So I have re-licensed the project.
I'd love to see/help with a multivariable integration library. I'd prefer a port rather then bindings just for the ease of installation/bare_matal/wasm support. It should probably have good integration with ndarray.

Overall this looks go to me. The nits left:

  • bump the min rust test in both CI
  • bump the min rust in the readme
  • update the change log to show the no_std in an unreleased breaking change
  • set up some kind of reminder for when num_traits 0.2 is released

@vks
Copy link
Contributor Author

vks commented Feb 2, 2018

See rust-num/num-traits#32 for the related PR.

@Eh2406
Copy link
Owner

Eh2406 commented Feb 2, 2018

Looks good so far, appveyor needs to be updated then I am good to merge.

@Eh2406 Eh2406 merged commit 624682a into Eh2406:master Feb 2, 2018
@Eh2406
Copy link
Owner

Eh2406 commented Feb 2, 2018

Thank you again!

@vks vks deleted the no-std branch February 2, 2018 19:43
@Eh2406 Eh2406 mentioned this pull request Apr 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants