Might be a duplicate of #14
The work here is to circle back to the earlier crates:
and add #![no_std] to the top of their lib.rs, see what breaks.
I suspect the things that will break will be of the flavour:
fn do something(..) -> Vec<u8>;
some of those will be able to convert to -> [u8; LEN] for some obvious choice of parametrized constant LEN (like the size of the hash function), but some of them might really need to be -> Vec<u8> in which case we should leave them but establish a pattern for guarding them with a cargo feature so that they compile out when building in no_std
Something like:
#[cfg(feature = "alloc")]
fn do something(..) -> Vec<u8>;
or maybe we want all crates to have a feature "std" as suggested here
#![no_std]
#[cfg(feature = "std")]
fn do something(..) -> Vec<u8>;
and add [features] std = [] (probably default = ["std"]) to Cargo.toml for all crates that use it.
Might be a duplicate of #14
The work here is to circle back to the earlier crates:
and add
#![no_std]to the top of theirlib.rs, see what breaks.I suspect the things that will break will be of the flavour:
some of those will be able to convert to
-> [u8; LEN]for some obvious choice of parametrized constantLEN(like the size of the hash function), but some of them might really need to be-> Vec<u8>in which case we should leave them but establish a pattern for guarding them with a cargo feature so that they compile out when building in no_stdSomething like:
or maybe we want all crates to have a feature
"std"as suggested hereand add [features] std = [] (probably default = ["std"]) to Cargo.toml for all crates that use it.