55 releases (26 breaking)

0.26.1-rc.0 Oct 22, 2024
0.25.1-rc.0 Oct 10, 2024
0.22.0 Jul 3, 2024
0.18.0 Mar 27, 2024
0.0.0 Oct 3, 2022

#243 in Magic Beans

Download history 5/week @ 2024-07-11 133/week @ 2024-08-01 14/week @ 2024-08-08 26/week @ 2024-08-15 5/week @ 2024-08-22 97/week @ 2024-08-29 70/week @ 2024-09-05 57/week @ 2024-09-12 105/week @ 2024-09-19 249/week @ 2024-09-26 76/week @ 2024-10-03 401/week @ 2024-10-10 584/week @ 2024-10-17 101/week @ 2024-10-24

1,193 downloads per month
Used in rusk-abi

MPL-2.0 license

235KB
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

~25–35MB
~635K SLoC