Skip to content

ava-labs/timestampvm-rs-template

Repository files navigation

timestampvm-rs-template

timestampvm-rs-template is a cargo generate template for timestampvm-rs, a minimal implementation of an Avalanche custom virtual machine (VM) in Rust, using the Avalanche Rust SDK.

Usage

First install cargo generate

cargo install cargo-generate

then to use this template run:

cargo generate --git https://github.com/ava-labs/timestampvm-rs-template --name myproject

Dependencies

  • Latest version of stable Rust.
  • To build and test the plugin you need protoc version >= 3.15.0.

Build the plugin

# Use the build script
./scripts/build.release.sh

# or build using cargo

cargo build --release --bin {{project-name}}

Run e2e tests

VM_PLUGIN_PATH=$(pwd)/target/release/{{project-name}} \
./scripts/tests.e2e.sh

# or, specify the custom avalanchego binary
VM_PLUGIN_PATH=$(pwd)/target/release/{{project-name}} \
./scripts/tests.e2e.sh ~/go/src/github.com/ava-labs/avalanchego/build/avalanchego

# (optional) set NETWORK_RUNNER_ENABLE_SHUTDOWN=1 in "tests.e2e.sh"
# to shut down the network afterwards

For more examples see the timestampvm-rs repo.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published