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
1,193 downloads per month
Used in rusk-abi
235KB
5K
SLoC
π-crust
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