Skip to main content

Sui Environment Setup

Before you start developing with Sui and Move, you should familiarize yourself with how to contribute to Sui, how Sui is structured, what tools and SDKs exist, and what plugins are available to use in your IDE.

Fork the Sui repository

The recommended way to contribute to the Sui repository is to fork the project, make changes on your fork, then submit a pull request (PR). The Sui repository is available on GitHub: https://github.com/MystenLabs/sui.

To create a local Sui repository:

  1. Go to the Sui repository on GitHub.

  2. Click the Fork button to create a copy of the repository in your account.

    Fork Sui repo

  3. In your forked repository on GitHub, click the green Code <> button and copy the HTTPS URL GitHub provides.

    Copy URL

  4. Open a terminal or console on your system at the location you want to save the repository locally. Type git clone and paste the URL you copied in the previous step and press Enter.

  5. Type cd sui to make sui the active directory.

You can use any branching strategy you prefer on your Sui fork. Make your changes locally and push to your repository, submitting PRs to the official Sui repository from your fork as needed.

tip

Be sure to synchronize your fork frequently to keep it up-to-date with active development.

Using Sui from command line

You can interact with the Sui network through two official SDKs (TypeScript SDK and Rust SDK), and by using the Sui CLI. For more details about using the Sui CLI, see Install Sui and the Sui CLI reference.

Move IDEs and plugins

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-analyzer extension, then install the move-analyzer language server passing address32 using the --features flag and passing sui-move to the branch flag:

cargo install --git https://github.com/move-language/move move-analyzer --branch sui-move --features "address32"

See more IDE options in the Awesome Move documentation.

After you install VS Code and the move-analyzer extension, check out the Move code examples.

To test or run a Move example on Sui, use the sui move command from the Sui CLI.

Sui repository and how to contribute

The Sui repo is a monorepo, containing all the source code that is used to build and run the Sui network, as well as this documentation.

The root folder of the Sui monorepo has the following top-level folders:

  • apps: Contains the source code for the main web applications that Mysten Labs runs, Sui Wallet.
  • crates: Contains all the Rust crates that are part of the Sui system.
  • dapps: Contains some examples of decentralized applications built on top of Sui, such as Kiosk or Sponsored Transactions.
  • dashboards: Currently empty.
  • doc: Contains deprecated documentation related to Move and Sui.
  • docker: Contains the docker files needed to spin up a node, an indexer, a Full node or other services.
  • docs: Contains this documentation and the source for this site.
  • examples: Contains examples of apps written for Sui and smart contracts written in Move.
  • external-crates: Contains the source code for the Move programming language.
  • kiosk: Contains the source code of the Mysten Labs Kiosk extensions and rules, as well as examples.
  • narwhal: Contains the source code of Narwhal and partially synchronous Bullshark, a DAG-based mempool, and efficient BFT consensus.
  • nre: Contains information about node and network reliability engineering.
  • scripts: Contains a number of scripts that are used internally.
  • sdk: Contains the source code for different tools and SDKs, such as the Sui TypeScript SDK, Kiosk SDK, BCS, zkLogin, dApp kit, and others.
  • sui-execution: Contains the source code responsible for abstracting access to the execution layer.

The following primary directories offer a good starting point for exploring the Sui codebase:

Development branches

The Sui repository includes four primary branches: devnet, testnet, mainnet, 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 Devnet. If you encounter an issue or find a bug, it may already be fixed in the main branch. To submit a PR, you should push commits to your fork of the main branch.

The testnet branch includes the code running on the Sui Testnet network.

The mainnet branch includes the code running on the Sui Mainnet network.

The main branch includes the most recent changes and updates. Use the main branch if you want to contribute to the Sui project or to experiment with cutting-edge functionality. The main branch might include unreleased changes and experimental features, so use it at your own risk.