Chik-Network / klvm_rs

Rust implementation of clvm

Repository from Github https://github.comChik-Network/klvm_rsRepository from Github https://github.comChik-Network/klvm_rs

Rust implementation of klvm.

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 klvm_rs uses cargo-fuzz.

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

To generate an initial corpus (for the run_program fuzzer), run:

cd tools
cargo run generate-fuzz-corpus

To get started, run:

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

But with whatever number of jobs works best for you.

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

Build Wheel

The klvm_rs wheel has python bindings for the rust implementation of klvm.

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

$ pip install maturin

While in the wheel directory, build klvm_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".

About

Rust implementation of clvm

License:Apache License 2.0


Languages

Language:Rust 84.0%Language:Python 15.5%Language:JavaScript 0.6%