소스에서 설치
These instructions are for special use cases. For most users, Quick Install shows the best way to install Sui.
Sui는 로컬에서 source로 설치하거나 GitHub에서 직접 설치할 수 있다.
최소한 Sui framework를 위해 Rust와 Cargo가 설치되어 있어야 한다:
-
Rust를 다운로드해 설치한다:
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shRust가 설치되어 있다면 최신 version으로 업데이트한다:
$ rustup update stable -
Cargo를 다운로드해 설치한다:
$ curl https://sh.rustup.rs -sSf | sh운영 체제에 따라 추가 prerequisite가 필요할 수 있다.
Additional prerequisites
- macOS
- Linux
- Windows
Most modern MacOS systems have Homebrew and cURL preinstalled.
-
Download and install Homebrew:
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -
Download and install CMake:
$ brew install cmakeVerify installation with
$ cmake --version -
Download and install libpq:
$ brew install libpqVerify installation with
$ libpq --version -
Download and install PostgreSQL.
These prerequisites use the apt package manager for Linux. Adjust the commands accordingly per your package manager.
You can install all of the prerequisites for Linux at once using the following command:
$ sudo apt-get install curl git-all cmake gcc libssl-dev pkg-config libclang-dev libpq-dev build-essential
-
Download and install Rust:
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shIf you have Rust installed, update to the latest version:
$ rustup update stable -
Download and install Cargo
$ curl https://sh.rustup.rs -sSf | sh -
Download and install cURL:
$ sudo apt-get install curlVerify installation with
$ curl --version -
Download and install Git CLI:
$ sudo apt-get install git-allVerify installation with
$ git --version -
Download and install CMake:
$ sudo apt-get install cmakeVerify installation with
$ cmake --version -
Download and install GCC:
$ sudo apt-get install gccVerify installation with
$ gcc --version -
Download and install libssl-dev:
$ sudo apt-get install libssl-devIf the version of Linux you use doesn't support libssl-dev, find an equivalent package for it on the ROS Index.
If you have OpenSSL you might also need to also install pkg-config:
$ sudo apt-get install pkg-config -
Download and install libclang-dev:
$ sudo apt-get install libclang-devIf the version of Linux you use doesn't support libclang-dev, find an equivalent package for it on the ROS Index.
-
If you plan to use the
--with-indexerand--with-graphqloptions withsui start, download and install libpq-dev:$ sudo apt-get install libpq-devSee Local Network for more information.
If the version of Linux you use doesn't support libpq-dev, find an equivalent package for it on the ROS Index.
-
Download and install build-essential:
$ sudo apt-get install build-essential
-
Windows 11 ships with a Microsoft version of cURL already installed; however, if you are using Windows 10 or want to use the cURL project version instead, download and install it from https://curl.se/windows/.
-
Download and install the Git command line interface.
-
Download and install CMake.
-
Download and install the LLVM Compiler Infrastructure. Look for a file with a name similar to
LLVM-15.0.7-win64.exefor 64-bit Windows, orLLVM-15.0.7-win32.exefor 32-bit Windows. -
Download and install C++ build tools before downloading Rust.
-
Download and install Rust.
If you use Windows 11, see information about using the Rust installer on the Rust website. The installer checks for C++ build tools and prompts you to install them if necessary. Select the option that best defines your environment and follow the instructions in the install wizard.
If you have Rust installed, update to the latest version:
$ rustup update stable -
Download and install Cargo: Download and install
rustup-init.exe -
Download Protocol Buffers (
protoc-xx.x-win32.ziporprotoc-xx.x-win64.zip) and add the\bindirectory to your WindowsPATHenvironment variable. -
For Windows on ARM64 only: Download and install Visual Studio 2022 Preview.
GitHub에서 직접 설치하거나 로컬 드라이브에서 source로 설치할 수 있다.
어느 install from source 방법을 사용하든 Sui 구성 요소는 ~/.cargo/bin 폴더에 있다.
파일에 로컬로 접근하려면 Sui 환경 설정 문서를 참고해 source code를 다운로드할 수도 있다.
- GitHub source
- Local source
Cargo를 사용해 GitHub repo에서 Sui를 직접 설치한다:
$ cargo install --locked --git https://github.com/MystenLabs/sui.git --branch testnet sui --features tracing
tracing feature는 Sui CLI에 서 Move test coverage와 debugger 지원을 활성화한다.
tracing을 활성화하지 않으면 이 기능을 사용할 수 없다.
필요한 경우 앞선 명령의 testnet branch를 다른 것으로 바꾼다.
사용 가능한 옵션은 다음과 같다:
main: 최신 업데이트.- 가장 불안정하다.
devnet: 실험적 feature를 포함한다.testnet: beta feature를 포함한다.mainnet: 안정 릴리스.
필요에 따라 추가 package를 빌드하고 설치할 수 있다.
앞선 명령의 sui를 다음 표의 package 이름으로 바꾼다.
| Name | Description |
|---|---|
move-analyzer | Language Server Protocol implementation. |
sui | Main Sui binary. |
sui-bridge | Sui native bridge. |
sui-data-ingestion | Capture full node data for indexer to store in a database. |
sui-faucet | Local faucet to mint coins on local network. |
sui-node | Run a local node. |
sui-test-validator | Run test validators on a local network for development. |
sui-tool | Provides utilities for Sui. |
공개 Sui repo를 clone하고 로컬 머신에서 source로 설치할 수 있다.
-
Sui repo를 fork한다.
-
console을 사용해 원하는 디렉터리에 fork를 clone한다.
$ git clone https://github.com/YourOrg/sui.git -
repo 디렉터리로 이동하고 빌드에 사용할 branch로 전환한다.
main: 최신 업데이트.- 가장 불안정하다.
devnet: 실험적 feature를 포함한다.testnet: beta feature를 포함한다.mainnet: 안정 릴리스.
$ git switch testnet -
repo 루트에서
cargo install명령을 실행한다.$ cargo install --locked --path crates/sui --features tracing
tracing feature는 Sui CLI에서 Move test coverage와 debugger 지원을 활성화한다.
tracing을 활성화하지 않으면 이 기능을 사용할 수 없다.