servo / euclid

Geometry primitives (basic linear algebra) for Rust
Other
460 stars 102 forks source link

Implement actual support for no_std #372

Closed CryZe closed 4 years ago

CryZe commented 4 years ago

With num-traits having recently gained full support for no_std by using the libm crate, this crate can now fully support no_std as well without any sacrifices.

Currently num-traits has not released a new version yet, so this uses a git dependency until then.

Additionally the tests should fail at the moment when using the libm, as there actually was a bug in libm, but I have created a PR for it.


This change is Reviewable

CryZe commented 4 years ago

So this is done, but the one test fails because sincosf was broken in Rust's libm port. However this has since been fixed, but no new version of libm has been published. https://github.com/rust-lang/libm/pull/229

Not sure how you want me to proceed here.

nical commented 4 years ago

Thanks! My preference would be to wait for the the new libm to be published and depend on the fixed revision in this PR.

nical commented 4 years ago

I filed https://github.com/rust-lang/libm/issues/231

CryZe commented 4 years ago

libm 0.2.0 is released, I just opened a PR against num-traits: https://github.com/rust-num/num-traits/pull/144

nical commented 4 years ago

Looks like your PR to num-traits with the new libm made it to crates.io in 0.2.10.

CryZe commented 4 years ago

Alright, I bumped the version and it seems to work now.

nical commented 4 years ago

Thanks for your persistence!

@bors-servo r+

bors-servo commented 4 years ago

:pushpin: Commit 7ce307b has been approved by nical

bors-servo commented 4 years ago

:hourglass: Testing commit 7ce307b630dc43a60064c3004cd566f8da8dea65 with merge a53be3d119c917e3c41c948a4d2762a40bacf647...

bors-servo commented 4 years ago

:sunny: Test successful - checks-travis Approved by: nical Pushing a53be3d119c917e3c41c948a4d2762a40bacf647 to master...