core-foundation-rs
core-foundation-rs copied to clipboard
core-foundation-sys: Enable `no_std` environment
Since the purpose of this crate is the bindings to an external library and they're pretty much complete, we can see that the only thing we use in libstd are the pointer types and std::cmp
. In fact they're defined in libcore and then exported through libstd. I doubt that we will ever need any libstd only stuff such as heap allocation, vectors, hashmaps, etc. I propose making core-foundation-sys a no_std
crate. It maybe useful in some rare situations. For instance, windows-sys crate (Microsoft's official Rust bindings) is no_std and it can be used for writing kernel drivers.
I think we should have an actual use case otherwise it doesn't seem worth increasing the MSRV for.
Maybe it's acceptable because core-foundation
that depends on this crate already has minimum Rust version of 1.64.0 (using of std::ffi::Cstr).
Hmm, it looks like this import has been added a couple of years ago, but rust docs says it was added in 1.64.0
:umbrella: The latest upstream changes (presumably b009c87f2da0038bb474800cd88597843e5dbdae) made this pull request unmergeable. Please resolve the merge conflicts.