Skip to content

Commit 2b43fa9

Browse files
committed
refactor: split codegen and runtime crates
1 parent df43290 commit 2b43fa9

48 files changed

Lines changed: 393 additions & 597 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cargo.lock

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

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,12 @@ all = "warn"
3838
[workspace.dependencies]
3939
revmc = { version = "0.1.0", path = "crates/revmc", default-features = false }
4040
revmc-backend = { version = "0.1.0", path = "crates/revmc-backend", default-features = false }
41+
revmc-codegen = { version = "0.1.0", path = "crates/revmc-codegen", default-features = false }
4142
revmc-build = { version = "0.1.0", path = "crates/revmc-build", default-features = false }
4243
revmc-builtins = { version = "0.1.0", path = "crates/revmc-builtins", default-features = false }
4344
revmc-context = { version = "0.1.0", path = "crates/revmc-context", default-features = false }
4445
revmc-llvm = { version = "0.1.0", path = "crates/revmc-llvm", default-features = false }
46+
revmc-runtime = { version = "0.1.0", path = "crates/revmc-runtime", default-features = false }
4547

4648
alloy-primitives = { version = "1.5", default-features = false }
4749
ruint = { version = "1.17", default-features = false }

crates/revmc-codegen/CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [0.1.0](https://github.com/paradigmxyz/revmc/releases/tag/v0.1.0) - 2024-06-27
9+
10+
### Dependencies
11+
12+
- Bump revm
13+
14+
### Documentation
15+
16+
- Add changelogs
17+
18+
### Features
19+
20+
- Add target configuration ([#39](https://github.com/paradigmxyz/revmc/issues/39))
21+
- Improve DX around statically linked bytecodes, add example ([#37](https://github.com/paradigmxyz/revmc/issues/37))
22+
- Implement IR builtins ([#36](https://github.com/paradigmxyz/revmc/issues/36))
23+
24+
### Miscellaneous Tasks
25+
26+
- Replace timing macros with tracy ([#40](https://github.com/paradigmxyz/revmc/issues/40))
27+
- Add release configuration
28+
- Update some comments
29+
- Rebrand to `revmc` ([#33](https://github.com/paradigmxyz/revmc/issues/33))
30+
31+
<!-- generated by git-cliff -->

crates/revmc-codegen/Cargo.toml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
[package]
2+
name = "revmc-codegen"
3+
description = "EVM bytecode compiler code generation"
4+
homepage = "https://github.com/danipopes/revmc/tree/main/crates/revmc-codegen"
5+
6+
version.workspace = true
7+
authors.workspace = true
8+
edition.workspace = true
9+
rust-version.workspace = true
10+
license.workspace = true
11+
categories.workspace = true
12+
keywords.workspace = true
13+
repository.workspace = true
14+
exclude.workspace = true
15+
16+
[package.metadata.docs.rs]
17+
no-default-features = true
18+
rustdoc-args = ["--cfg", "docsrs"]
19+
20+
[lints]
21+
workspace = true
22+
23+
[dependencies]
24+
revmc-backend.workspace = true
25+
revmc-builtins = { workspace = true, features = ["ir"] }
26+
revmc-context = { workspace = true, features = ["evm"] }
27+
revmc-llvm = { workspace = true, optional = true }
28+
29+
alloy-primitives = { workspace = true, features = ["std", "map-fxhash"] }
30+
31+
revm-bytecode.workspace = true
32+
revm-context-interface.workspace = true
33+
revm-context.workspace = true
34+
revm-database-interface.workspace = true
35+
revm-handler.workspace = true
36+
revm-inspector.workspace = true
37+
revm-interpreter.workspace = true
38+
revm-primitives.workspace = true
39+
revm-state.workspace = true
40+
41+
bitflags = "2.5"
42+
derive_more = { version = "2", default-features = false, features = ["debug"] }
43+
bitvec = "1.0"
44+
either = "1.13"
45+
tempfile = "3.10"
46+
tracing.workspace = true
47+
48+
arbitrary = { version = "1.3", optional = true }
49+
paste = { workspace = true, optional = true }
50+
similar-asserts = { version = "2.0", optional = true }
51+
tracing-subscriber = { workspace = true, features = ["fmt"], optional = true }
52+
smallvec = "1.15.1"
53+
oxc_index = { version = "4.1.0", features = ["nonmax"] }
54+
indexmap = "2.13.0"
55+
56+
[build-dependencies]
57+
revmc-build.workspace = true
58+
59+
[dev-dependencies]
60+
revmc-context.workspace = true
61+
revmc-statetest = { path = "../revmc-statetest" }
62+
63+
paste.workspace = true
64+
similar-asserts = "2.0"
65+
snapbox = "1.1"
66+
tracing-subscriber = { workspace = true, features = ["fmt"] }
67+
68+
[features]
69+
default = ["llvm"]
70+
llvm = ["dep:revmc-llvm"]
71+
llvm-prefer-static = ["llvm", "revmc-llvm?/prefer-static"]
72+
llvm-prefer-dynamic = ["llvm", "revmc-llvm?/prefer-dynamic"]
73+
74+
asm-keccak = ["alloy-primitives/asm-keccak"]
75+
76+
# Internal features.
77+
__fuzzing = ["dep:arbitrary", "dep:paste", "dep:similar-asserts", "dep:tracing-subscriber"]

crates/revmc-codegen/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# revmc-codegen
2+
3+
EVM bytecode compiler frontend and code generation pipeline.
4+
5+
This crate contains the bytecode parser and analysis passes, the generic compiler driver, linker helpers, and test utilities for producing JIT and AOT artifacts through compiler backends such as `revmc-llvm`.
6+
7+
For the runtime worker pool and hot-code lookup backend, see `revmc-runtime`. For the umbrella crate, see `revmc`.
File renamed without changes.

0 commit comments

Comments
 (0)