Install Sui to Build

Learn how to install and configure Sui to develop smart contracts on the Sui blockchain.

Before you install Sui, you need to install some prerequisite tools and configure your development environment.

The steps to install Sui include:

  1. Install prerequisites for your operating system.
  2. Install the Sui binaries.
  3. Configure an Integrated Development Environment (IDE).
  4. Request SUI tokens to evaluate Devnet and Sui Wallet.
  5. Optionally, download the source code to have local access to examples and contribute to Sui.

Sui repository

The Sui repository includes two primary branches, devnet and main.

  • The devnet branch includes the latest stable build of Sui. Choose the devnet branch if you want to build or test on Sui. If you encounter an issue or find a bug, it may already be fixed in the main branch. To submit a pull request (PR), you should push commits to your fork of the main branch.
  • The main branch includes the most recent changes and updates. Use the main branch if you want to contribute to the Sui project. The main branch may include unreleased changes, or introduce changes that cause issues in apps created using an earlier version.

Documentation in the Sui repository

The main and devnet branches of the Sui repository contain the relevant documentation for each branch. A version toggle on the documentation site enables you to switch between main branch content (labeled Latest build) and devnet branch content (labeled Devnet). Make sure the toggle is set to Devnet for to learn how to install, configure, and build on Sui. The content in Latest build is useful to learn about potential updates to Sui, but the features and functionality described might not ever become available in the devnet branch.

Supported operating systems

Sui supports the following operating systems, beginning with the versions indicated.

  • Linux - Ubuntu version 20.04 (Bionic Beaver)
  • macOS - macOS Monterey
  • Microsoft Windows - Windows 11


Install the prerequisites and tools you need to work with Sui. Click a marker in the table to jump to the relevant section.

Package/OSLinuxmacOSWindows 11
Rust and CargoXXX
C++ build toolsX
LLVM CompilerX

Rust and Cargo

Sui requires Rust and Cargo on all supported operating systems. Some operating systems require cURL to download Rust and Cargo, so check the relevant prerequisite section to install cURL first, if necessary.

Use the following command to install Rust and Cargo on macOS or Linux:

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

Windows 11 users can use the Rust installer available on the Rust website. The installer detects if you do not have the required C++ build tools and prompts you to install. Select the option that best defines your environment and follow the instructions in the install wizard.

For additional installation options, see Install Rust on the Rust website.

Sui uses the latest version of Cargo to build and manage dependencies. See the Cargo installation page on the Rust website for more information.

Use the following command to update Rust:

rustup update stable

After you install Rust, proceed to the prerequisites for your operating system.

Linux prerequisites

Note: The Linux instructions assume a distribution that uses the APT package manager. Adapt the instructions as needed for other package managers.

Install the prerequisites listed in this section. You should make sure that your system has the latest version of apt-get. Use the following command to update apt-get:

sudo apt-get update


Install cURL with the following command:

sudo apt install curl

Verify that cURL installed correctly with the following command:

curl --version


Run the following command to install Git, including the Git CLI:

sudo apt-get install git-all

For more information, see Install Git on Linux on the GitHub website.


Install CMake using the instructions at Installing CMake on the CMake website.


Use the following command to install libssl-dev:

sudo apt-get install libssl-dev


Use the following command to install libclang-dev:

sudo apt-get install libclang-dev

Proceed to Install Sui binaries to continue installing Sui.

macOS prerequisites

macOS includes a version of cURL you can use to install Brew. Use Brew to install other tools, including a newer version of cURL.


Use the following command to install Brew:

/bin/bash -c "$(curl -fsSL"


Use the following command to update the default cURL on macOS:

brew install curl


Use the following command to install CMake:

brew install cmake


Use the following command to install Git:

brew install git

After installing Git, download and install the Git command line interface.

Proceed to Install Sui binaries to continue installing Sui.

Windows prerequisites

Install the following prerequisites to work with Sui on Microsoft Windows 11.


Windows 11 ships with a Microsoft version of cURL already installed. If you want to use the curl project version instead, download and install it from


Download and install the Git command line interface.


Download and install CMake from the CMake website.

Protocol Buffers

Download Protocol Buffers ( or and add the \bin directory to your Windows PATH environment variable.

Additional tools for Windows

Sui requires the following additional tools on computers running Windows.

If the progress appears to freeze, press Enter in the command prompt to fix the issue.

Known issue - The sui console command does not work in PowerShell.

Install Sui binaries

With Cargo installed, use the following command to install Sui binaries:

cargo install --locked --git --branch devnet sui

The command installs the following Sui components in ~/.cargo/bin:

If the previous command fails, make sure you have the latest version of Rust installed:

rustup update stable
source "$HOME/.cargo/env"

macOS and Linux

Confirm the binaries are installed with .cargo/bin appearing in your PATH variable:

echo $PATH


Confirm the binaries are installed with .cargo\bin appearing in your PATH variable:

echo %PATH%

Use the --help flag to access helpful information for any of these binaries.

Important - Make sure your entire toolchain stays up-to-date. If you encounter issues building and installing the Sui binaries, update all packages and re-install.

Integrated development environment

The recommended IDE for Move development is Visual Studio Code with the move-analyzer extension. Follow the Visual Studio Marketplace instructions to install the move-nalyzer extension, passing address20 using the --features flag:

cargo install --git move-analyzer --features "address20"

See more IDE options in the Awesome Move documentation.

SUI tokens

To experiment with Devnet or use the Sui Wallet browser extension, add SUI tokens to your account address.

To request SUI test tokens from the browser extension:

  1. Use the Sui Wallet browser extension to open your wallet.
  2. Click Request Sui Devnet Tokens.

To request SUI test tokens in Discord:

  1. Join the Sui Discord If you haven’t already.
  2. Identify your address through either the Sui Wallet browser extension or by running the following command and electing to connect to a Sui RPC server if prompted:
    sui client active-address
  3. Request tokens in the #devnet-faucet channel using the syntax: !faucet <YOUR_ADDRESS>, for example:
    !faucet 0xd72c2c90ed9d923cb0ed2ca91db5be9e1c9b5ccb
  4. A bot on the channel distributes tokens to you automatically.

Source code

View the Sui repository on GitHub:

Clone the Sui repository:

git clone --branch devnet

The following primary directories offer a good starting point for exploring Sui's source code:

  • sui - Sui CLI binary
  • sui_framework - Sui Move core smart contracts (e.g., coin.move, object.move, test_scenario.move, ...)
  • sui_programmability - Sui Move code examples (games, defi, nfts, ...)
  • sui_core - authority server and Sui Gateway
  • sui-types - coins, gas, and other object types
  • explorer - browser-based object explorer for the Sui network
  • sui-network - networking interfaces


See the Rust Crates in use at:


To contribute updates to Sui code, send pull requests our way.

Note: The previous git clone command syncs with the devnet branch, which makes sure the source code is compatible with our Devnet. If you want to run a network locally using the latest version and don't need to interact with our Devnet, you should switch to main branch.

Next steps

Continue your journey through:

Last update 1/18/2023, 4:44:38 PM