dtolnay / ryu

Fast floating point to string conversion
Apache License 2.0
606 stars 27 forks source link

Sealed `Float` trait limits potential usages #50

Closed Riderfighter closed 1 year ago

Riderfighter commented 1 year ago

The current project I am working on requires me to use a runtime that doesn't support Rust's f32/f64 primitives. The way the Ryu crate has been implemented runs into an issue where it is not possible to add support for a third party floating point implementation.

An easy fix from what I can tell would be to unseal the Float.

dtolnay commented 1 year ago

This library isn't intended for supporting nonstandard float implementations.

Riderfighter commented 1 year ago

@dtolnay I believe you should re-evaluate this position.

An alternative implementation doesn't equate to a floating point library with nonstandard behavior. The library I am using is an implementation of the IEEE 754 specification meaning it is equivalent to the native floats.

Curious if this information would change your position or not.