Closed kayabaNerve closed 4 months ago
https://github.com/kayabaNerve/serai/tree/foundation shows the changes needed for this re: crypto, monero.
The end goal is all crates under crypto, bitcoin-serai, and monero-serai to support no_std (likely alloc) builds. There is further commentary on the usability of a monero-serai such built, as it can sign tranactions yet not create them. There likely should be some refactor of the RPC so a message channel could be defined as the RPC, allowing JS to handle web requests and just pass comms back and forth.
Rust 1.70 stabilized OnceCell which will let us remove lazy-static. lazy-static inverts the usual no-std handling (if you want to support no-std, you always have to use a less efficient no-std compat crate), so that'll be great.
https://github.com/serai-dex/serai/commit/adfbde6e2494290099511c39976915522bfd6239 moved Monero to an arbitrary RPC.
monero-serai is now no-std as of #311.
Closing this as having made sufficient progress.
We have some crates explicitly no_std, yet it'd be great to offer no_std/alloc variants of others.
monero-serai would have to std-feature-gate its RPC. It also uses serde-json in its seed code. That could be replaced simply by making the JSON files it read Rust files (
vec![
instead of[
).hashbrown offers a HashSet/HashMap on alloc alone.
We'd need a way to replace the Read/Write traits though...