mavlink / rust-mavlink

MAVLink library for Rust.
https://mavlink.github.io/rust-mavlink/mavlink/
Apache License 2.0
158 stars 79 forks source link

Broken `no_std` from recent commits #227

Closed peterkrull closed 8 months ago

peterkrull commented 8 months ago

The commits relating to the new PeekReader, and some changes to the error types (specifically the use of std::io::Error) from 7d6a1c4 have made the library not usable in no_std environments.

tjrmarques commented 8 months ago

Hi @peterkrull ,

I may have a fix in my fork https://github.com/tjrmarques/rust-mavlink, in the backtracking-parser-nostd branch.

Can you please check if it solves the issue? If it does, I'll post a pull request. If it doesn't, can you please provide a sample project/target that fails, as I don't have a no_std environment?

peterkrull commented 8 months ago

Thanks for taking a look at it. I am not able to test it right now, since I use a branch with some modifications on top of it in my project. But I think you can test compatibility yourself by just importing the library in a bin crate with #![no_std] in the main file. If the compiler does not freak out, it is likely no_std compatible. The Github actions also fail on the current version, so that can also be used as an indicator.

tjrmarques commented 8 months ago

No errors on my side, some tests do complain about embedded_hal on my laptop, which I guess is normal. CI seems happy though!