Skip to content

Installing Dojo

Dojo's installation process was designed to be idiomatically consistent with its dependencies, Rust and Cairo. You can get up-and-running in just a few steps, and be building provable games in no time.

Installing protobuf

You will need Protocol Buffers installed in order to run Dojo's Torii indexer.

Installation will use your system's package manager. You can find instructions here.

You can test your installation by running protoc --version in your terminal.

Installing Rust with rustup

You will need Rust in order to run Dojo's infrastructure tools Katana and Torii.

You can install the Rust toolchain by running the following in your terminal:

curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh

This will install Rust's executables, including the cargo package manager, in the ~/.cargo directory.

You can test your installation by running cargo --version in your terminal.

For more information about installing Rust, see the docs.

Installing Cairo with starkup

Dojo is written in Cairo, StarkWare's language for creating provable programs. Cairo was inspired by Rust, and its installation is no exception.

You can install the Cairo toolchain by running the following in your terminal:

curl --proto '=https' --tlsv1.2 -sSf https://sh.starkup.sh | sh

This will install Cairo's toolchain, including the scarb package manager and build tool, in the ~/.asdf directory. It will also append a starkup command alias to your shell profile.

You can test your installation by running scarb --version in your terminal.

For more information about installing Cairo, see the docs.

Installing Dojo with dojoup

Finally, install Dojo. dojoup is the preferred way to install Dojo.

Install dojoup

Install the dojoup installer by running the following in your terminal:

curl -L https://install.dojoengine.org | bash

This command will install dojoup in the ~/.dojo directory. It will also append a source ~/.dojo/env command to your shell profile.

You will need to restart your terminal for the dojoup command to be available.

Run dojoup install

In a new terminal window, run dojoup install to install Dojo.

dojoup install

This will install katana, torii, and sozo in the ~/.dojo directory.

You can test your installation by running sozo --version in your terminal.

For more information on advanced usage, such as installing a particular version or building from source, run dojoup --help.

Installing Dojo with asdf

You can alternatively use asdf directly to install and manage Dojo.

Install asdf

Follow the asdf installation instructions for your platform, if not already installed.

Add the asdf-dojo plugin

asdf plugin add dojo https://github.com/dojoengine/asdf-dojo

Install the latest or a specific version

asdf install dojo latest # For the latest version
asdf install dojo 1.0.0  # For a specific version

Set the version locally or globally

asdf set dojo latest        # Set in the project dir
asdf set --home dojo latest # Set globally (in the user's home dir)

Installing Cairo for VS Code

Install the Cairo 1.0 extension for Visual Studio Code for syntax highlighting and more!