fix: Added CI back for check_no_std with compilation to wasm32#9347
fix: Added CI back for check_no_std with compilation to wasm32#9347puma314 wants to merge 2 commits intoparadigmxyz:mainfrom
check_no_std with compilation to wasm32#9347Conversation
|
@mattsse after this PR is merged, I can work on making |
mattsse
left a comment
There was a problem hiding this comment.
this currently does not compile without default features because we need to use this combo:
thiserror-no-std = { workspace = true, default-features = false }
std = ["thiserror-no-std/std"]
| "rand", | ||
| ] } | ||
| ], optional = true } | ||
| k256 = { version = "0.13.3", default-features = false, features = ["ecdsa"] } |
There was a problem hiding this comment.
why do we need this if we're not using it?
Rjected
left a comment
There was a problem hiding this comment.
This is cool! It would be great to have this in CI
|
|
||
| for package in "${no_std_packages[@]}"; do | ||
| cmd="cargo +stable build -p $package --target riscv32imac-unknown-none-elf --no-default-features" | ||
| cmd="cargo +stable build -p $package --target wasm32-wasi --no-default-features" |
There was a problem hiding this comment.
| cmd="cargo +stable build -p $package --target wasm32-wasi --no-default-features" | |
| cmd="cargo +stable build -p $package --target wasm32-wasip1 --no-default-features" |
wasm32-wasi is being renamed to wasm32-wasip1 and will be removed
rust-lang/compiler-team#607
Previously the CI check for
check_no_stdwas commented out, as theriscv32imac-unknown-none-elftarget doesn't come withstdand there are many dependencies inreththat don't supportno_std, making it difficult to compile to this target.However, there are several embedded environments (namely zkVMs like SP1) that do support
std, but do not (easily) support crates with embedded C++ dependencies (like secp256k1, or blst or z-std) and also do not support networking crates like socket. The zkVM embedded environment is therefore similar to a target likewasm32-wasiwhich comes withstd, but also does not support crates like secp256k1, blst and does not support networking crates.This PR adds back the
no_stdCI check but with thewasm32-wasitarget, which should be significantly easier to support within Reth and also will ensure that all relevant packages that might be used in a zkVM context can compile.With this PR,
reth-codecsandreth-primitives-traitscompiles withno-default-featurestowasm32-wasi.reth-primitivesalmost compiles withno-default-features, but I'm running into this weird error that I was hoping @JackG-eth could help with since I saw he did the replacement ofthiserror_no_std::Erroreverywhere.