#smart-contracts #virtual-machine

no-std piecrust

Dusk's virtual machine for running WASM smart contracts

76 releases

Uses new Rust 2024

new 0.30.0 Mar 31, 2026
0.29.0-rc.4 Feb 4, 2026
0.29.0-rc.3 Dec 12, 2025
0.29.0-rc.2 Jul 25, 2025
0.0.0 Oct 3, 2022

#373 in Magic Beans

Download history 9/week @ 2025-12-04 19/week @ 2025-12-11 48/week @ 2026-01-01 5/week @ 2026-01-15 20/week @ 2026-01-22 135/week @ 2026-01-29 86/week @ 2026-02-05 453/week @ 2026-02-12 170/week @ 2026-02-19 64/week @ 2026-02-26 429/week @ 2026-03-05 1008/week @ 2026-03-12 575/week @ 2026-03-19

2,100 downloads per month
Used in 5 crates (2 directly)

MPL-2.0 license

355KB
7.5K SLoC

π-crust

Repository Build Status Documentation

WASM virtual machine for running Dusk's smart contracts.

Usage

use piecrust::VM;
let mut vm = VM::ephemeral().unwrap();

let bytecode = /*load bytecode*/;

let mut session = vm.session(SessionData::builder())?;
let contract_id = session.deploy(bytecode).unwrap();

let result = session.call::<i16, i32>(contract_id, "function_name", &0x11)?;

// use result

Build and Test

To build and test the crate one will need a Rust toolchain, Make, and the wasm-tools binary.

sudo apt install -y make # ubuntu/debian - adapt to own system
cargo install wasm-tools
make test

Release History

To see the release history for this crate, please see the CHANGELOG file.

License

This code is licensed under the Mozilla Public License Version 2.0 (MPL-2.0). Please see the LICENSE for further details.

Contribute

If you want to contribute to this project, please check the CONTRIBUTING file.

Dependencies

~29–45MB
~706K SLoC