Atmelfan / scpi-rs

Rust SCPI parser
Apache License 2.0
37 stars 6 forks source link

[BUG] Missing math symbols #6

Closed Atmelfan closed 3 years ago

Atmelfan commented 4 years ago

Describe the bug When compiling to an embedded device some symbols might not be defined.

Replacing .round() can be done using libm.

To Reproduce Compile scpi for a target which does not have these symbols.

Expected behavior Library should compile.

Library and tool versions:

Additional context A issue is that lexical_core which is used to parse numbers uses core intrinsics for some math operations which does not exist on all targets. Linking to libc -lc can make it compile but in my case segfaults later.

A CI/CD test should be created to avoid regression.

Atmelfan commented 4 years ago

<f32|f64>.round() is fixed by using the libm feature on targets where intrinsics are not supported.

Atmelfan commented 3 years ago

Fixed by lexical-core 0.7.6. Use "libm" feature (default on) on stable no_std.