57 releases (27 breaking)

new 0.27.0-rc.0 Nov 26, 2024
0.26.1-rc.0 Oct 22, 2024
0.22.0 Jul 3, 2024
0.18.0 Mar 27, 2024
0.0.0 Oct 3, 2022

#252 in Magic Beans

Download history 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 112/week @ 2024-10-24 54/week @ 2024-10-31 118/week @ 2024-11-07 210/week @ 2024-11-14 131/week @ 2024-11-21

518 downloads per month
Used in rusk-abi

MPL-2.0 license

240KB
5.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
~640K SLoC