logoDocumentation

Setting Up Your Environment

Learn how to set up your environment to build a Rust VM.

In this section, we will focus on getting set up with the Rust environment necessary to build with the avalanche-types crates (recall that avalanche-types contains the SDK we want to use to build our Rust VM).

Installing Rust

First and foremost, we will need to have Rust installed locally. If you do not have Rust installed, you can install rustup (the tool that manages your Rust installation) here.

Adding avalanche-types to Your Project

Once you have Rust installed and are ready to build, you will want to add the Avalanche-Types crate to your project. Below is a baseline example of how you can do this:

Cargo.toml
[dependencies]
avalanche-types = "0.1.4"

However, if you want to use the TimestampVM as a reference for your project, a more appropriate import would be the following:

Cargo.toml
[dependencies]
avalanche-types = { version = "0.1.4", features = ["subnet", "codec_base64"] } 

Last updated on

On this page

Edit on Github