core-foundation-sys: Enable no_std environment#609
core-foundation-sys: Enable no_std environment#609michaelwright235 wants to merge 1 commit intoservo:mainfrom
no_std environment#609Conversation
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.
madsmtm
left a comment
There was a problem hiding this comment.
👍
Beware that this bumps MSRV to 1.64.
|
I think we should have an actual use case otherwise it doesn't seem worth increasing the MSRV for. |
|
Maybe it's acceptable because |
|
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 |
|
☔ The latest upstream changes (presumably b009c87) made this pull request unmergeable. Please resolve the merge conflicts. |
|
This was done in #692 in the end. |
|
If we treat this like an issue rather than a PR, there's still 3 things outstanding:
If @michaelwright235 would like to rebase this to do that, that's great ... or we can open a new PR that does so? |
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 ano_stdcrate. 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.