Skip to content

EVM - Wasm Interoperability #23

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

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

EVM - Wasm Interoperability #23

wants to merge 16 commits into from

Conversation

bbyalcinkaya
Copy link
Member

@bbyalcinkaya bbyalcinkaya commented Jun 26, 2025

This PR integrates the Stylus semantics directly into the KEVM semantics, delivering a unified execution and state model for both Stylus (Wasm) and Solidity (EVM) contracts, and enables EVM <-> WASM cross-vm calls. The key changes include:

  • Included the EVM semantics into the project and updated the compilation targets to successfully build the project with all necessary dependencies.
  • Refactored the Stylus semantics to be built on top of EVM semantics; unified blockchain state management under the <kevm> cell, including all account data.
  • Introduced the <stylusvm> cell to manage Stylus contract execution context. The <stylusvm> cell contains the <wasm> cell and the <stylusStack> cell.
  • Implemented semantics to support inter-contract calls between EVM and Wasm contracts in both directions.
  • Added interoperability tests to validate seamless cross-language contract interactions.

@bbyalcinkaya bbyalcinkaya changed the title Refactor Stylus semantics to run on top of KEVM EVM - Wasm Interoperability Jul 11, 2025
@bbyalcinkaya bbyalcinkaya force-pushed the evm branch 2 times, most recently from 46ccccd to 6cb036a Compare July 28, 2025 08:59
@bbyalcinkaya
Copy link
Member Author

🔧 Installation

Clone the repository (including submodules) and checkout to this branch:

git clone --recurse-submodules https://github.com/runtimeverification/skribe.git
cd skribe
git checkout evm

1. Install the K Framework

bash <(curl https://kframework.org/install)
kup install k

2. Install UV (Python dependency manager)

curl -LsSf https://astral.sh/uv/install.sh | sh

3. Build the Stylus semantics

make kdist-build

▶️ Usage

Working examples are included and exercised in our CI.

  • src/tests/integration/data/simulation/call_counter_evm_to_wasm.json
  • src/tests/integration/data/simulation/call_counter_wasm_to_evm.json

First, build the contracts involved in the simulation:

make test-contracts

Then, run the simulation test:

uv run skribe-simulation run src/tests/integration/data/simulation/call_counter_evm_to_wasm.json

✅ A 0 exit code denotes success.

@bbyalcinkaya bbyalcinkaya marked this pull request as ready for review July 29, 2025 10:43
Copy link
Contributor

@juliankuners juliankuners left a comment

Choose a reason for hiding this comment

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

nix changes LGTM

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