To get started, make sure to setup all the prerequisite tools on your local machine (an installer has not yet been developed).
For an introduction to Rust, see the excellent Rust book.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
rustup component add rustfmtSee the solana docs for installation instructions. On macOS and Linux,
sh -c "$(curl -sSfL https://release.solana.com/v1.8.5/install)"Yarn is recommended for JavaScript package management.
npm install -g yarnAnchor binaries are available via an NPM package @project-serum/anchor-cli. Only x86_64 Linux is supported currently, you must build from source for other OS'.
npm i -g @project-serum/anchor-cliFor now, we can use Cargo to install the CLI.
cargo install --git https://github.com/project-serum/anchor --tag v0.19.0 anchor-cli --lockedOn Linux systems you may need to install additional dependencies if cargo install fails. On Ubuntu,
sudo apt-get update && sudo apt-get upgrade && sudo apt-get install -y pkg-config build-essential libudev-devNow verify the CLI is installed properly.
anchor --versionTo initialize a new project, simply run:
anchor init <new-project-name>| Build tool | Version |
|---|---|
| Node.js | v11.0.0 |