43 releases (20 breaking)

new 0.20.0 Jun 5, 2024
0.18.1 Apr 24, 2024
0.18.0 Mar 27, 2024
0.14.0 Dec 13, 2023
0.0.0 Oct 3, 2022

#1738 in Magic Beans

Download history 532/week @ 2024-02-12 837/week @ 2024-02-19 440/week @ 2024-02-26 45/week @ 2024-03-04 60/week @ 2024-03-11 168/week @ 2024-03-18 98/week @ 2024-03-25 56/week @ 2024-04-01 10/week @ 2024-04-08 4/week @ 2024-04-15 126/week @ 2024-04-22 19/week @ 2024-04-29 120/week @ 2024-05-06 12/week @ 2024-05-13 21/week @ 2024-05-20 2/week @ 2024-05-27

156 downloads per month
Used in rusk-abi

MPL-2.0 license

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

~25–35MB
~626K SLoC