docs/content/guides/developer/getting-started/install-source.mdx
You can install Sui from source, either locally or directly from GitHub. At minimum, you will need Rust and Cargo installed for the Sui framework:
Download and install Rust:
<div className="pl-8"> ```sh $ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ```If you have Rust installed, update to the latest version:
$ rustup update stable
Download and install Cargo:
<div className="pl-8"> ```sh $ curl https://sh.rustup.rs -sSf | sh ``` </div>Depending on your operating system, you may require additional prerequisites.
You can install from source either directly from GitHub or from your local drive. Regardless of which install from source method you use, the Sui components are found in the ~/.cargo/bin folder.
You can also download the source code to locally access files.
<Tabs> <TabItem label="GitHub source" value="github">Use Cargo to install Sui directly from the GitHub repo:
$ cargo install --locked --git https://github.com/MystenLabs/sui.git --branch testnet sui --features tracing
:::info
The tracing feature enables Move test coverage and debugger support in the Sui CLI. These features are not available unless you enable tracing.
:::
Replace the testnet branch in the previous command if necessary. Available options are:
- `main`: Latest updates. Least stable.
- `devnet`: Includes experimental features.
- `testnet`: Includes beta features.
- `mainnet`: Stable release.
You can build and install additional packages as needed. Replace sui in the previous command with the package name in the following table.
You can clone the public Sui repo and install from source on your local machine.
Fork the Sui repo.
Use a console to clone the fork to the desired directory.
$ git clone https://github.com/YourOrg/sui.git
Navigate to the repo directory and switch to the branch you want to build against.
main: Latest updates. Least stable.devnet: Includes experimental features.testnet: Includes beta features.mainnet: Stable release.$ git switch testnet
Run the cargo install command from the repo root.
$ cargo install --locked --path crates/sui --features tracing
:::info
The tracing feature enables Move test coverage and debugger support in the Sui CLI. These features are not available unless you enable tracing.
:::
</TabItem> </Tabs>