36 releases (16 breaking)

new 0.16.0 Feb 14, 2024
0.15.0 Jan 24, 2024
0.14.0 Dec 13, 2023
0.13.0 Nov 22, 2023
0.0.0 Oct 3, 2022

#17 in #smart-contract

Download history 64/week @ 2023-10-30 33/week @ 2023-11-06 45/week @ 2023-11-13 97/week @ 2023-11-20 92/week @ 2023-11-27 118/week @ 2023-12-04 138/week @ 2023-12-11 28/week @ 2023-12-18 75/week @ 2023-12-25 20/week @ 2024-01-01 64/week @ 2024-01-08 93/week @ 2024-01-15 75/week @ 2024-01-22 221/week @ 2024-01-29 158/week @ 2024-02-05 863/week @ 2024-02-12

1,321 downloads per month
Used in rusk-abi

MPL-2.0 license

200KB
4.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

~24–37MB
~641K SLoC