Expand description
A minimal helper crate for implementing float-related operations for WebAssembly in terms of the native platform primitives.
This crate is intended to assist with solving the portability issues such as:
- Functions like
f32::truncare not available in#![no_std]targets. - The
f32::truncfunction is likely faster than thelibmfallback. - Behavior of
f32::truncdiffers across platforms, for example it’s different on Windows and glibc on Linux. Additionally riscv64’s implementation oflibmseems to have different NaN behavior than other platforms. - Some wasm functions are in the Rust standard library, but not stable yet.
There are a few locations throughout the codebase that these functions are needed so they’re implemented only in a single location here rather than multiple.