title |
---|
Install Sui |
Sui is written in Rust, and we are using Cargo to build and manage the dependencies. As a prerequisite, you will need to install Cargo version 1.60.0 or higher in order to build and install Sui on your machine.
To develop in Sui, you will need the Sui binaries. After installing cargo
, run:
$ cargo install --git https://github.com/MystenLabs/sui.git sui
This will put these binaries in your PATH
(ex. under ~/.cargo/bin
) that provide these command line interfaces (CLIs):
sui-move
: Build and test Move packages.wallet
: Run a local Sui network and gateway service accessible via the wallet CLI. The wallet CLI manage keypairs to sign/send transactions.rest_server
: Run a local Sui network and gateway service accessible via a REST interface.rpc-server
: Run a local Sui network and gateway service accessible via an RPC interface.
Confirm the install with:
$ echo $PATH
And ensure the .cargo/bin
directory appears.
For Move development, we recommend the Visual Studio Code (vscode) IDE with the Move Analyzer language server plugin installed:
$ cargo install --git https://github.com/diem/move move-analyzer
Then follow the Visual Studio Marketplace instructions to install the Move Analyzer extension. (The cargo install
command for the language server is broken there; hence, we include the correct command above.)
See more IDE options in the Awesome Move docs.
If you need to download and understand the Sui source code, clone the Sui repository:
$ git clone https://github.com/MystenLabs/sui.git
You can start exploring Sui's source code by looking into the following primary directories:
- sui - the Sui binaries (
wallet
,sui-move
, and more) - sui_programmability - Sui's Move language integration also including games and other Move code examples for testing and reuse
- sui_core - authority server and Sui Gateway
- sui_types - coins, gas, and other object types
- explorer - object explorer for the Sui network
- network_utils - networking utilities and related unit tests
To contribute updates to Sui code, send pull requests our way.
Continue your journey through: