rust-embedded / book

Documentation on how to use the Rust Programming Language to develop firmware for bare metal (microcontroller) devices
https://docs.rust-embedded.org/book/
Apache License 2.0
1.08k stars 173 forks source link

Interoperability: On the availability of `std::ffi` and `std::os::raw` in `core` #348

Closed abt8601 closed 1 year ago

abt8601 commented 1 year ago

The section on interoperability mentions that "Neither of these modules [std::ffi and std::os::raw] are available in core". Nonetheless, core::ffi has been around since Rust 1.30 and, to my knowledge, contains almost everything that std::ffi and std::os::raw has to offer.

Moreover, since the documentation of std::os::raw explicitly states, "Use core::ffi instead" and that std::ffi contains everything that std::os::raw has, we should probably remove mentions of std::os::raw.

eldruin commented 1 year ago

Sounds reasonable. Please feel free to open a PR updating the section.