AltF02 / x11-rs

Rust bindings for X11 libraries
https://docs.rs/x11
MIT License
207 stars 66 forks source link

Modify the X11 crate for no_std #116

Closed notgull closed 2 years ago

notgull commented 4 years ago

This resolves #93 by turning the x11 crate into a #![no_std] crate. x11 now has the std feature, enabled by default. At the crate root, I have created the crate-private os_primitives module. This module will reexport the std::os::raw module if the std feature is enabled, or reexport the C primitives within libc if it is disabled. In this PR, I also cleaned up the code somewhat and ran the rustfmt program.

Note that the x11-dl crate within this repository still uses std. I have modified it slightly to be compatible with the changes described above.