piecrust

Crates.iopiecrust
lib.rspiecrust
version0.26.1-rc.0
sourcesrc
created_at2022-10-03 09:29:53.181335
updated_at2024-10-22 08:32:14.649622
descriptionDusk's virtual machine for running WASM smart contracts.
homepage
repositoryhttps://github.com/dusk-network/piecrust
max_upload_size
id678870
size282,919
Dusk Network (dusknetwork)

documentation

README

π-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.

Commit count: 1023

cargo fmt