rust-ndarray / ndarray-stats

Statistical routines for ndarray
https://docs.rs/ndarray-stats
Apache License 2.0
200 stars 25 forks source link

`no-std` support? #95

Open hiltay opened 10 months ago

hiltay commented 10 months ago

Hello! I want to put it in an embedded environment. Any no-std support?

xd009642 commented 10 months ago

So there's some limited no-std support in ndarray itself. The dependencies of ndarray-stats would have to be vetted and then there might be a possibility to restrict any that use std features to their no-std versions. Looking briefly at it indexmap has a no-std but it requires the alloc feature. I believe ndarray itself might require libm.

As it stands this would need a PR to add the necessary feature and make std required features optional and then from doing that initially you can work out if there's any further work that needs doing in the ecosystem (generally once you do it and see things don't build properly because of some std dep being pulled in).

I don't have time to do this myself - and have minimal involvement in the project - but if you submit a PR I can do some review and pointers. I was involved in the no-std work for ndarray way back whenever it was!

hiltay commented 10 months ago

Thanks! I'll give it a shot.