MCPcopy Index your code
hub / github.com/Chia-Network/clvm_rs

github.com/Chia-Network/clvm_rs @0.18.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.18.0 ↗ · + Follow
1,034 symbols 4,031 edges 129 files 153 documented · 15%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Rust implementation of clvm.

GitHub Coverage Status Build Crate Build Wheels

PyPI Crates.io

The cargo workspace includes an rlib crate, for use with rust or other applications, and a python wheel.

The python wheel is in wheel. The npm package is in wasm.

Tests

In order to run the unit tests, run:

cargo test

Fuzzing

The fuzzing infrastructure for clvm_rs uses cargo-fuzz.

Documentation for setting up fuzzing in rust can be found here.

To get started, run:

cargo fuzz run run-program --jobs=32 -- -rss_limit_mb=4096

But with whatever number of jobs works best for you.

If you find issues in clvm_rs please use our bug bounty program.

Build Wheel

The clvm_rs wheel has python bindings for the rust implementation of clvm.

Use maturin to build the python interface. First, install into current virtualenv with

$ pip install maturin

While in the wheel directory, build clvm_rs into the current virtualenv with

$ maturin develop --release

On UNIX-based platforms, you may get a speed boost on sha256 operations by building with OpenSSL.

$ maturin develop --release --features=openssl

To build the wheel, do

$ maturin build --release

or

$ maturin build --release --features=openssl

Bumping Version Number

Make sure you have cargo-workspaces installed:

cargo install cargo-workspaces

To bump the versions of all relevant crates:

cargo ws version --force "**" --all --no-git-commit

Select "minor update" if there has not been any incompatible API changes, otherwise "major update".

Extension points exported contracts — how you extend this code

VisitStrategy (Interface)
Pluggable visit-order strategy for `emit_instructions`. A strategy may carry its own precomputed tables (e.g. DP result [1 …
src/serde_2026/strategy.rs
Dialect (Interface)
(no doc) [2 implementers]
src/dialect.rs

Core symbols most depended-on inside this repo

new_atom
called by 245
src/allocator.rs
new_pair
called by 223
src/allocator.rs
to
called by 145
wheel/python/clvm_rs/program.py
len
called by 117
src/allocator.rs
push
called by 111
src/serde/tree_cache.rs
push
called by 109
src/run_program.rs
nil
called by 92
src/allocator.rs
write
called by 69
src/serde/ser.rs

Shape

Function 591
Method 341
Class 64
Enum 36
Interface 2

Languages

Rust75%
Python25%

Modules by API surface

src/allocator.rs173 symbols
wheel/python/tests/test_serialize.py55 symbols
src/more_ops.rs54 symbols
wheel/python/tests/test_program.py50 symbols
wheel/python/clvm_rs/program.py43 symbols
src/op_utils.rs37 symbols
src/run_program.rs31 symbols
wheel/python/tests/test_apis.py29 symbols
tools/src/bin/benchmark-clvm-cost.rs27 symbols
src/serde/tools.rs21 symbols
src/serde/tree_cache.rs19 symbols
clvm-fuzzing/src/make_tree.rs18 symbols

For agents

$ claude mcp add clvm_rs \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact