Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: partial wasm32-wasi compilation #9430

Closed
wants to merge 2 commits into from

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
reth-trie-common = { path = "crates/trie/common" }
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?

@@ -16,6 +17,11 @@ pub(crate) fn default_page_size() -> usize {
os_page_size.clamp(min_page_size, libmdbx_max_page_size)
}

#[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
Collaborator

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