Let's start with the installation of the Linera development tools.
The Linera toolchain consist of two crates:
linera-sdkis the main library to program Linera applications in Rust. It also includes the Wasm test runner binary
linera-servicedefines four binaries:
linera-- the main client tool, to operate user wallets,
linera-proxy-- the Linera proxy, which acts as an ingress for validators,
linera-server-- the Linera workers behind the proxy,
linera-db-- a command line tool to manage persistent storage.
The Linera client and validators run as a set of native binaries. Below is a matrix of supported operating systems.
|Linux x86 64-bit||Mac OS (M1 / M2)||Mac OS (x86)||Windows|
|✓ Main platform||✓ Working||✓ Working||Untested|
The required software may installed as follows on Linux:
Rust and Wasm
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup target add wasm32-unknown-unknown
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v21.11/protoc-21.11-linux-x86_64.zip
unzip protoc-21.11-linux-x86_64.zip -d $HOME/.local
~/.localis not in your path, add it:
On certain Linux distributions, you may have to install development packages such as
For MacOS, see the installation section on GitHub.
You may install binaries with
cargo install linera-sdk cargo install linera-service
linera-sdk as a library for Linera Wasm applications:
cargo add linera-sdk
Download the source from GitHub:
git clone https://github.com/linera-io/linera-protocol.git
To install the Linera toolchain locally from source, you may run:
cargo install --path linera-sdk cargo install --path linera-service
Alternatively, for developing and debugging, you may instead use the binaries
compiled in debug mode, e.g. using
This manual has been tested against the following commit of the repository:
Consider adding the output of
linera net helper to your
help with automation.