If you are unfamiliar with the RISC-V instruction set, please have a look at the RISC-V instruction set reference.
Below are instructions for setting up development environment. For instructions on enrolling CI machines, see the notion page
You can open this repository in GitHub Codespaces, click on Create new codespace
and start developing straight away in your browser. All build requirements will be taken care of. You can stop or resume the instance anytime. (You can also find the '<> Code' button on the top right of the main page of the repository on GitHub to access the codespaces you created. See the Codespaces documentation for background information.)
Mozak VM is built in Rust, so installing the Rust toolchain is a pre-requisite, if you want to develop on your local machine.
cargo build
To run all the tests in this repo, use:
cargo test
Selectively run tests using the following command:
cargo test --package <pkg> --lib -- <testname> --exact --nocapture
For example:
cargo test --package mozak-circuits --lib -- cross_table_lookup::tests::test_ctl --exact --nocapture
We have a rudimentary CLI. You can run it via eg cargo run -- -vvv run vm/tests/testdata/rv32ui-p-addi
.
Use cargo run -- --help
to see what sub-commands are implemented.
Updating the official RISC-V tests relies on Docker to install the RISC-V toolchain and build the ELF files necessary for our tests to run.
The Mozak VM implements the base RV32I instruction set with the M-extension, so we are using rv32ui and rv32um ELF files from the riscv-software-src/riscv-tests repo.
You can update the tests via ./update_testdata
in the root of the repository.
To update the Rust toolchain, change rust-toolchain.toml
.
Welcome to zk-backed high throughput stateful network!
- See building for building the components for running the system.
- See contributing for guidelines on contributions towards to the codebase.
sdk/
hosts interfaces for building programs for the platform.rpc/
hosts server implementation for RPC interactions with the platform.node-cli/
hosts command-line interface for managing running nodes.
Architecture docs along with other design overwiews are available in docs/
. Relevant docs are inter-spread in the codebase as comments.