mirror of
https://github.com/0glabs/0g-storage-node.git
synced 2024-11-10 10:05:17 +00:00
1.8 KiB
1.8 KiB
Install
ZeroGStorage requires Rust 1.71.0 and Go to build.
Install Rust
We recommend installing Rust through rustup.
-
Linux
Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh rustup install 1.65.0
Other dependencies
- Ubuntu
sudo apt-get install clang cmake build-essential
- Ubuntu
-
Mac
Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh rustup install 1.65.0
brew install llvm cmake
-
Windows
Download and run the rustup installer from this link.
Install LLVM, pre-built binaries can be downloaded from this link.
Install Go
-
Linux
# Download the Go installer wget https://go.dev/dl/go1.19.3.linux-amd64.tar.gz # Extract the archive sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.19.3.linux-amd64.tar.gz # Add /usr/local/go/bin to the PATH environment variable by adding the following line to your ~/.profile. export PATH=$PATH:/usr/local/go/bin
-
Mac
Download the Go installer from https://go.dev/dl/go1.19.3.darwin-amd64.pkg.
Open the package file you downloaded and follow the prompts to install Go. -
Windows
Download the Go installer from https://go.dev/dl/go1.19.3.windows-amd64.msi.
Open the MSI file you downloaded and follow the prompts to install Go.
Build from source
# Download code
$ git clone https://github.com/zero-gravity-labs/zerog-storage-rust.git
$ cd zerog-storage-rust
$ git submodule update --init
# Build in release mode
$ cargo build --release