Skip to content

Commit 7cc7af3

Browse files
authored
refactor: moved revm-rwasm driver from revm into fluentbase repository including syscalls, disabled warnings for svm-related crates (#149)
1 parent e7d95b0 commit 7cc7af3

File tree

26 files changed

+2791
-171
lines changed

26 files changed

+2791
-171
lines changed

Cargo.lock

Lines changed: 17 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ fluentbase-codec-derive = { path = "./crates/codec-derive", default-features = f
3333
fluentbase-contracts = { path = "./crates/contracts", default-features = false }
3434
fluentbase-evm = { path = "./crates/evm", default-features = false }
3535
fluentbase-genesis = { path = "./crates/genesis", default-features = false }
36+
fluentbase-revm = { path = "./crates/revm", default-features = false }
3637
fluentbase-runtime = { path = "./crates/runtime", default-features = false }
3738
fluentbase-sdk = { path = "./crates/sdk", default-features = false }
3839
fluentbase-sdk-derive = { path = "./crates/sdk-derive", default-features = false }
@@ -42,6 +43,7 @@ fluentbase-svm = { path = "./crates/svm", default-features = false }
4243
fluentbase-svm-shared = { path = "./crates/svm-shared", default-features = false }
4344
fluentbase-erc20 = { path = "./crates/erc20", default-features = false }
4445

46+
# solana
4547
solana-pubkey = { git = "https://github.com/fluentlabs-xyz/agave", branch = "feat/svm", default-features = false }
4648
solana-instruction = { git = "https://github.com/fluentlabs-xyz/agave", branch = "feat/svm", default-features = false }
4749
solana-account-info = { git = "https://github.com/fluentlabs-xyz/agave", branch = "feat/svm", default-features = false }
@@ -149,6 +151,7 @@ bincode = { version = "2.0.1", default-features = false, features = ["alloc", "d
149151
convert_case = "0.8.0"
150152
proc-macro2 = { version = "1.0", default-features = false }
151153
quote = { version = "1.0" }
154+
152155
# revm
153156
revm = { path = "revm/crates/revm", default-features = false, features = ["secp256r1"] }
154157
primitives = { path = "revm/crates/primitives", package = "revm-primitives", default-features = false }
@@ -164,7 +167,6 @@ context = { path = "revm/crates/context", package = "revm-context", default-feat
164167
context-interface = { path = "revm/crates/context/interface", package = "revm-context-interface", default-features = false }
165168
handler = { path = "revm/crates/handler", package = "revm-handler", default-features = false }
166169
op-revm = { path = "revm/crates/op-revm", default-features = false }
167-
rwasm-revm = { path = "revm/crates/rwasm-revm", default-features = false }
168170

169171
# alloy
170172
alloy-eip2930 = { version = "0.2.0", default-features = false }

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Core libraries and infrastructure:
4040
* `erc20` — ERC20 contract utilities (marked for deprecation).
4141
* `evm` — EVM execution support.
4242
* `genesis` — Build scripts for generating Fluent L2 genesis files with precompiled contracts.
43+
* `revm` — A driver for Revm integration.
4344
* `runtime` — rWASM/WebAssembly runtime enabling host function integrations.
4445
* `sdk` — Developer SDK with all necessary types, macros, entrypoint definitions, and allocators.
4546
* `svm` — SVM execution engine.

contracts/Cargo.lock

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/genesis/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@ use fluentbase_genesis::devnet_genesis_from_file;
1313
let genesis = devnet_genesis_from_file();
1414
```
1515

16+
---
17+
1618
This crate is part of the [Fluentbase](https://github.com/fluentlabs-xyz/fluentbase) project.

crates/revm/Cargo.toml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
[package]
2+
name = "fluentbase-revm"
3+
description = "Fluent variant of Revm"
4+
version.workspace = true
5+
authors.workspace = true
6+
edition.workspace = true
7+
keywords.workspace = true
8+
license.workspace = true
9+
repository.workspace = true
10+
readme.workspace = true
11+
12+
[package.metadata.docs.rs]
13+
all-features = true
14+
rustdoc-args = ["--cfg", "docsrs"]
15+
16+
[lints.rust]
17+
unreachable_pub = "warn"
18+
unused_must_use = "deny"
19+
rust_2018_idioms = "deny"
20+
21+
[lints.rustdoc]
22+
all = "warn"
23+
24+
[dependencies]
25+
# revm
26+
revm = { workspace = true }
27+
rwasm = { workspace = true }
28+
29+
# Optional
30+
serde = { workspace = true, features = ["derive", "rc"], optional = true }
31+
32+
# fluentbase
33+
fluentbase-runtime.workspace = true
34+
fluentbase-sdk.workspace = true
35+
36+
[dev-dependencies]
37+
alloy-sol-types.workspace = true
38+
sha2.workspace = true
39+
serde_json = { workspace = true, features = ["alloc"] }
40+
alloy-primitives.workspace = true
41+
42+
[features]
43+
default = ["std", "c-kzg", "secp256k1", "portable", "blst"]
44+
std = [
45+
"serde?/std",
46+
"revm/std",
47+
"alloy-sol-types/std",
48+
"sha2/std",
49+
"serde_json/std",
50+
"alloy-primitives/std"
51+
]
52+
hashbrown = ["revm/hashbrown"]
53+
serde = [
54+
"dep:serde",
55+
"revm/serde",
56+
"alloy-primitives/serde"
57+
]
58+
portable = ["revm/portable"]
59+
60+
dev = [
61+
"memory_limit",
62+
"optional_balance_check",
63+
"optional_block_gas_limit",
64+
"optional_eip3607",
65+
"optional_no_base_fee",
66+
]
67+
memory_limit = ["revm/memory_limit"]
68+
optional_balance_check = ["revm/optional_balance_check"]
69+
optional_block_gas_limit = ["revm/optional_block_gas_limit"]
70+
optional_eip3607 = ["revm/optional_eip3607"]
71+
optional_no_base_fee = ["revm/optional_no_base_fee"]
72+
73+
# See comments in `revm-precompile`
74+
secp256k1 = ["revm/secp256k1"]
75+
c-kzg = ["revm/c-kzg"]
76+
# `kzg-rs` is not audited but useful for `no_std` environment, use it with causing and default to `c-kzg` if possible.
77+
kzg-rs = ["revm/kzg-rs"]
78+
blst = ["revm/blst"]
79+
bn = ["revm/bn"]
80+
81+
# fluentbase
82+
debug-print = ["fluentbase-runtime/debug-print"]
83+
wasmtime = ["fluentbase-runtime/wasmtime"]
84+
json = [
85+
"fluentbase-sdk/json",
86+
"revm/json"
87+
]

crates/revm/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Fluentbase Revm
2+
3+
A driver for integrating Revm with Fluentbase.
4+
It is widely used by both Reth and Foundry.
5+
6+
---
7+
8+
This crate is part of the [Fluentbase](https://github.com/fluentlabs-xyz/fluentbase) project.

0 commit comments

Comments
 (0)