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

docs: clang requirement #784

Merged
merged 3 commits into from Oct 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
33 changes: 22 additions & 11 deletions README.md
@@ -1,4 +1,4 @@
# revm
# revm

[![CI](https://github.com/bluealloy/revm/actions/workflows/ci.yml/badge.svg)][gh-ci]
[![License](https://img.shields.io/badge/License-MIT-orange.svg)][mit-license]
Expand All @@ -18,30 +18,42 @@ It has a fast and flexible implementation with a simple interface and embedded H
It passes all `ethereum/tests` test suites.

Here is a list of guiding principles that Revm follows.
- **EVM compatibility and stability** - this goes without saying but it is nice to put it here. In the blockchain industry, stability is the most desired attribute of any system.
- **Speed** - is one of the most important things and most decisions are made to complement this.
- **Simplicity** - simplification of internals so that it can be easily understood and extended, and interface that can be easily used or integrated into other projects.
- **interfacing** - `[no_std]` so that it can be used as wasm lib and integrate with JavaScript and cpp binding if needed.

* **EVM compatibility and stability** - this goes without saying but it is nice to put it here. In the blockchain industry, stability is the most desired attribute of any system.
* **Speed** - is one of the most important things and most decisions are made to complement this.
* **Simplicity** - simplification of internals so that it can be easily understood and extended, and interface that can be easily used or integrated into other projects.
* **interfacing** - `[no_std]` so that it can be used as wasm lib and integrate with JavaScript and cpp binding if needed.

# Project

Structure:

* crates
* revm -> main EVM library.
* revm-primitives -> Primitive data types.
* revm-interpreter -> Execution loop with instructions
* revm-precompile -> EVM precompiles
* revm -> main EVM library.
* revm-primitives -> Primitive data types.
* revm-interpreter -> Execution loop with instructions
* revm-precompile -> EVM precompiles
* bins:
* revme: cli binary, used for running state test jsons
* revme: cli binary, used for running state test jsons

This project tends to use the newest rust version, so if you're encountering a build error try running `rustup update` first.

There were some big efforts on optimization of revm:

* Optimizing interpreter loop: https://github.com/bluealloy/revm/issues/7
* Introducing Bytecode format (and better bytecode analysis): https://github.com/bluealloy/revm/issues/121
* Unification of instruction signatures: https://github.com/bluealloy/revm/pull/283

# Building from source

```shell
git clone https://github.com/bluealloy/revm.git
cd revm
cargo build --release
```

**_Note:_** `clang` is required for building revm with `c-kzg` or `secp256k1` feature flags as they depend on `C` libraries. If you don't have it installed, you can install it with `apt install clang`.

# Running eth tests

go to `cd bins/revme/`
Expand Down Expand Up @@ -81,7 +93,6 @@ cargo run -p revm --features ethersdb --example fork_ref_transact

(If you want to add project to the list, ping me or open the PR)


# Documentation

The book can be found at github page here: https://bluealloy.github.io/revm/
Expand Down