Allow libcrux to be compiled for no_std (embedded) environments
This allows libcrux to be compiled with the minimal Rust runtime, also known as no_std. This is necessary for some highly-constrained code environments, such as embedded devices, kernels, etc., where the full dependency set of the Rust standard library is too large or requires capabilities that do not exist in the target environment.
To do this, I added a new Cargo "feature" to the crate, called std. This feature is enabled by default. To target a no_std environment, you must first disable the default feature, then opt-in to only the features that your target environment needs.
The rand crate itself currently has a dependency on std, so the rand feature depends on std. If the rand crate itself provides a no_std environment, then this requirement could be lifted.
Assuming this goes forward, the CI/CD will need a new build job that verifies building with cargo build --no-default-features, to verify that no_std builds correctly.
@sivadeilra do you plan on updating this PR?
This PR has been marked as stale due to a lack of activity for 60 days. If you believe this pull request is still relevant, please provide an update or comment to keep it open. Otherwise, it will be closed in 7 days.
This PR has been closed due to a lack of activity since being marked as stale. If you believe this pull request is still relevant, please reopen it with an update or comment.