-
Notifications
You must be signed in to change notification settings - Fork 16
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
no_std support #21
base: master
Are you sure you want to change the base?
no_std support #21
Conversation
Same principle as nalgebra,simba,etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The need and no_std seems okay, but I don't quite get the manner in which it was implemented.
We've not been used num-traits
before, no line of code is generic on floating point types so what motivates that dependency? Some methods aren't available in no_std
, which is okay although you could elaborate and sum up which of them caused errors. Using libm
as a supplement for these is entirely reasonable but num-traits
is not necessary to achieve this. I'd rather not have it.
I am definitely not a Rust expert, so there may be a better way to it. In any case, without that
|
ie revert previous commit
I have done a bit of clean up: it now works both for NOTE: I have put PS: the |
Isn't it possible to use |
Probably not? I am not using the |
Huh, I wasn't aware |
To keep compat with Rust 1.34
Hi, I have downgraded the edition to Also, do you have a better idea for the feature's name because |
After some consideration of the API, there's some good ideas for a renovation and |
Generally, features should be (super-) additive, not subtractive. In this sense, |
So, there could be merely two features: |
- update #[cfg] logic in lib.rs - ci: add "no-std-check" with "features=num-traits"
Allright. So I have:
FIY this PR is blocking for image-rs/image#1868 |
NOTE: if you would rather keep min Rust to 1.34 I could alternatively gate the |
I'd prefer |
- bump `color_quant`: feature `alloc` renamed `num-traits` cf image-rs/color_quant#21 - `ImageDecoder`: remove `Reader` when no_std b/c cleaner
Done. I have also removed the |
I have added a |
I had forgotten to install "cargo-no-std-check". Should hopefully be good now. |
Hello,
I am currently in the process of porting
image
andimageproc
to work in SGX env, and I hit the issue of this crate usingstd
.So I am opening the PR to see if this could interest you.
And if so, I could clean up the commits, and/or rewrite them a bit more cleanly.