Lokathor / wide

A crate to help you go wide. By which I mean use SIMD stuff.
https://docs.rs/wide
zlib License
279 stars 23 forks source link

Make `std` a default feature #98

Closed CryZe closed 3 years ago

CryZe commented 3 years ago

wide has two major dependents, ultraviolet and simba. Neither of those activate wide's std feature, despite ultraviolet being an std only crate, and simba having an std feature itself. So I'd say, not only is having std not be the default a risky move, but in practice, people actually do seem to get it wrong, slowing them down unnecessarily.

Lokathor commented 3 years ago

I don't usually like calling in std if I don't have to.

Shouldn't ultraviolet and simba just turn on the std feature of wide in their usage of wide?

I mean we could do this if we have to but it seems like they should just adjust their dependency declaration.

CryZe commented 3 years ago

Well they probably should, but they wouldn't know about it if I didn't look into it. Unless you only ever expect those to be dependents, I'd recommend activating it by default. Yes, it's slightly more annoying to do a no_std like that, but it's much better than bad performance, when you are already only using wide for performance reasons anyway. And std being the default is the best practice and is widely used across the ecosystem. Maybe it makes sense to long term have better built-in cargo support for no_std but I don't think what wide is doing here is the solution.

Lokathor commented 3 years ago

grumble grumble fine but you gotta PR it.