Installing Dojo
Dojo's installation process was designed to be idiomatically consistent with its major dependencies, Rust and Cairo.
You can get up-and-running in three commands: rustup
, starkup
, and dojoup
.
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, including the cargo
package manager, by running the following in your terminal:
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
rustup
will install Rust's executables in the~/.cargo
directory.
For more information about installing Rust, see the docs.
Installing Cairo with starkup
Dojo is written in Cairo, StarkWare's language for writing provable programs. Cairo was inspired by Rust, and its installation is no exception.
You can install the Cairo toolchain, including the scarb
package manager and build tool, by running the following in your terminal:
curl --proto '=https' --tlsv1.2 -sSf https://sh.starkup.sh | sh
starkup
uses theasdf
version manager under-the-hood, installing Cairo's executables in the~/.asdf
directory.
For more information about installing Cairo, see the docs.
Installing Dojo with dojoup
Finally, you can install Dojo (including Katana, Torii, and Sozo) by running the following in your terminal:
curl -L https://install.dojoengine.org | bash
dojoup
will install Dojo's executables in the~/.dojo
directory.
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.
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!