Skip to main content

Setting Up Your Rust Environment

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:

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:

avalanche-types = { version = "0.1.4", features = ["subnet", "codec_base64"] }

Was this page helpful?