Open
Conversation
We can make the crate work in `#![[no_std]]` environments with minimal changes. Literaly just changing a few imports.
When we do not use `std`, we cannot load things dynamically with `libloading`. By its very nature, `libloading` will probably always include a lot of platform-specific code, making it not depend on `std` unrealistic. So, when someone says they do not want to use `std`, we should not use `libloading`. As long as downstream does not try to dynamically load something with `default-features=false`, this should never be a problem. What happens if downstream does try that, however? Well, then the Rust compiler with print an error saying they are trying to use a crate that does not exist. Because we default to using `std` (as is the standard for most optionally `no_std` crates), this should not cause any breakage.
Author
|
Update: I realized this is less trivial than I first thought, because of this crate's dependency on I have implemented a flag such that we only use I still believe this can be useful, as libraries downstream will be able to support |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We can make the crate work in
#![no_std]environments with minimal changes. Literally just changing a few imports.Should be trivial to maintain as well, just make sure to always import from
corerather thanstd. I could maybe try adding ano_stdtest to make sure the codegen always compiles inno_stdenvironments, if necessary.