librustc_apfloat is a Rust translation of LLVM's APFloat library, written in C++, and provides software implementations of f32, f64, and other floating-point types, which are useful for performing host-independent floating-point computation. We made a standalone crate of this for use in Cranelift, however other compiler projects could make use of such a library as well, and in general it'd be good to have only one copy of this code.
Where's the best place for the code live?
What should the crate be called?
rustc_apfloat -- the current name. "apfloat" isn't very descriptive, except that it's the name of the upstream code this crate is based on. And the crate isn't specific to rustc :-).
software_float -- a more descriptive name, and not yet claimed on crates.io
- other ideas?
cc @eddyb @lachlansneff
librustc_apfloat is a Rust translation of LLVM's APFloat library, written in C++, and provides software implementations of
f32,f64, and other floating-point types, which are useful for performing host-independent floating-point computation. We made a standalone crate of this for use in Cranelift, however other compiler projects could make use of such a library as well, and in general it'd be good to have only one copy of this code.Where's the best place for the code live?
What should the crate be called?
rustc_apfloat-- the current name. "apfloat" isn't very descriptive, except that it's the name of the upstream code this crate is based on. And the crate isn't specific to rustc :-).software_float-- a more descriptive name, and not yet claimed on crates.iocc @eddyb @lachlansneff