Crates.io | beam_bvm_interface |
lib.rs | beam_bvm_interface |
version | |
source | src |
created_at | 2022-09-18 05:47:28.32553 |
updated_at | 2022-10-03 03:35:43.322684 |
description | A direct interface to the Beam Virtual Machine functions and data structures |
homepage | |
repository | https://github.com/NewDark90/beam-bvm-interface |
max_upload_size | |
id | 668493 |
size | 0 |
A rust crate for referencing all of the Beam Virtual Machine methods and structs for dapps
All of the code here has been auto generated with bindgen. The goal of this package is to be the lowest level direct interface with the Beam Virtual Machine.
Documentation of the methods usable within the BVM can be found at the BeamMW Shader-SDK wiki
Install with cargo:
cargo install beam_bvm_interface
This crate is not going to delve into the specifics of compiling for the BVM. The steps needed in order to compile at all are here for you though.
This assumes a workspace with a contract
package, app
package, and optional shared code in a common
package.
rustup
on your system. See rust installation instructions here.$ rustup toolchain install stable
$ rustup target add wasm32-wasi
$ cargo build --target wasm32-wasi -r
./target/wasm32-wasi/release
directoryAfter that you can use app.wasm
and contract.wasm
files in the same way you use it in Beam's contracts (see https://github.com/BeamMW/shader-sdk/wiki/Running-Beam-Shaders-using-CLI-Wallet).
An example project can be used as a starter here: https://github.com/NewDark90/beam-bvm-starter