brundonsmith / rust_lisp

A Rust-embeddable Lisp, with support for interop with native Rust functions
239 stars 19 forks source link

Add optional libm feature. #23

Closed lasiotus closed 1 year ago

lasiotus commented 1 year ago

In some environments, e.g. non-standard OSes, libm C library might be missing, and the linker complains that it can't find roundf. Using the standard (Rust-project supported) libm in these situations resolves the issue.

brundonsmith commented 1 year ago

I merged this, but then I made this fix: https://github.com/brundonsmith/rust_lisp/commit/c8d9cc849a625c71cb000adb0d04bfa8bc50b415

In the course of which floats are no longer rounded during comparison, so the (current) libm changes ended up not being needed. I've removed the libm crate feature since it wouldn't be doing anything now, but if there's some other case in the future where libm is needed I'd be happy to reintroduce it