Skip to content

feat: partial wasm32-wasi compilation#9430

Closed
jtguibas wants to merge 2 commits intoparadigmxyz:mainfrom
jtguibas:john/zkvm-compilation
Closed

feat: partial wasm32-wasi compilation#9430
jtguibas wants to merge 2 commits intoparadigmxyz:mainfrom
jtguibas:john/zkvm-compilation

Conversation

@jtguibas
Copy link

@jtguibas jtguibas commented Jul 10, 2024

The goal of this PR is to set a foundation for supporting wasm32-wasi compilation of reth crates.

The currently supported crates are: reth-codecs, reth-consensus, reth-db, reth-db-api, reth-ethereum-forks, reth-evm, reth-evm-ethereum, reth-network-peers, reth-primitives, reth-primitives-traits, and reth-revm with no default features but std. Overtime, we can add support for more crates as needed.

Merging this PR succesfully requires having updated releases of revm and revm-inspector following the merge of this PR: bluealloy/revm#1601 due to the usage of kzg-rs instead of c-kzg to get compilation to work successfully.

add std feature to network-peers

get every crate to compile

Wasm

cleanup

cleanup diff
@jtguibas jtguibas force-pushed the john/zkvm-compilation branch from 8abc23a to 0983b37 Compare July 10, 2024 18:37
Cargo.toml Outdated
reth-trie-parallel = { path = "crates/trie/parallel" }

# revm
revm = { version = "11.0.0", features = [
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: Update once bluealloy/revm#1601 merged into revm and revm-inspectors is also updated.

@jtguibas jtguibas marked this pull request as draft July 10, 2024 18:38
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

supportive, but I'd like to do this in multiple steps

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you submit this separately?


#[cfg(not(feature = "page_size"))]
pub(crate) fn default_page_size() -> usize {
0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a bit dangerous

this is used as an option, so I think we want to make the function that is used to configure the page size return an option instead

geometry.shrink_threshold.unwrap_or(-1),
match geometry.page_size {
None => -1,
Some(PageSize::MinimalAcceptable) => 0,
Some(PageSize::Set(size)) => size as isize,
},

@shekhirin
Copy link
Member

Superseded by #10088

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants