IronCoreLabs/recrypt-rs

Attempt to get library building without the Rust standard library

Closed this issue · 1 comments

We should see how much work it would take to try and get recrypt to compile without the Rust standard library. This would make it much more portable and let it work in environments such as Alpine linux. Probably a feature flag and not something we'd do by default. This ticket will just be the investigation work and we'll write up subsequent tickets on things to change if the investigation goes well.

I built gridiron no_std successfully in no_std and no_std_flag. Benchmarking showed some (2-5%) change but repeated benchmarks seemed to vary so that may not have been a real issue.

Moving to recrypt revealed that the Error type requires std as do alternatives. This means quick_error can't be no_std, and we're using that a lot. The rust standard library Mutex also requires std, though there are alternative implementations that seem to be quality. Both of these problems are pretty large effort to get past so I'm going to stop working on this for now, but if we decide we want to do the work it should be possible. Also pushed a branch with this attempt in its current state.