2021-01-02 22:40:17 -08:00
|
|
|
# Installing Dependencies
|
2021-01-02 16:24:35 -08:00
|
|
|
|
2021-01-02 22:40:17 -08:00
|
|
|
To get started, make sure to setup all the prerequisite tools on your local machine
|
|
|
|
(an installer has not yet been developed).
|
2021-01-02 16:24:35 -08:00
|
|
|
|
|
|
|
## Install Rust
|
|
|
|
|
2021-01-02 22:40:17 -08:00
|
|
|
For an introduction to Rust, see the excellent Rust [book](https://doc.rust-lang.org/book/).
|
|
|
|
|
2021-01-02 16:24:35 -08:00
|
|
|
```bash
|
|
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
|
|
|
source $HOME/.cargo/env
|
|
|
|
rustup component add rustfmt
|
|
|
|
```
|
|
|
|
|
2021-01-02 22:40:17 -08:00
|
|
|
## Install Solana
|
2021-01-02 16:24:35 -08:00
|
|
|
|
2021-01-02 22:40:17 -08:00
|
|
|
See the solana [docs](https://docs.solana.com/cli/install-solana-cli-tools) for installation instructions. On macOS and Linux,
|
|
|
|
|
|
|
|
```bash
|
|
|
|
sh -c "$(curl -sSfL https://release.solana.com/v1.5.0/install)"
|
|
|
|
```
|
2021-01-02 16:24:35 -08:00
|
|
|
|
2021-01-02 22:40:17 -08:00
|
|
|
## Install Mocha
|
|
|
|
|
|
|
|
Program integration tests are run using [Mocha](https://mochajs.org/).
|
2021-01-02 16:24:35 -08:00
|
|
|
|
|
|
|
```bash
|
2021-01-02 22:40:17 -08:00
|
|
|
npm install -g mocha
|
2021-01-02 16:24:35 -08:00
|
|
|
```
|
|
|
|
|
2021-01-02 22:40:17 -08:00
|
|
|
## Install Anchor
|
|
|
|
|
|
|
|
For now, we can use Cargo to install the CLI.
|
2021-01-02 16:24:35 -08:00
|
|
|
|
|
|
|
```bash
|
2021-01-02 22:40:17 -08:00
|
|
|
cargo install --git https://github.com/project-serum/anchor anchor-cli
|
2021-01-02 16:24:35 -08:00
|
|
|
```
|
|
|
|
|
2021-01-02 22:40:17 -08:00
|
|
|
To install the JavaScript package.
|
2021-01-02 16:24:35 -08:00
|
|
|
|
2021-01-02 22:40:17 -08:00
|
|
|
```bash
|
|
|
|
npm install -g @project-serum/anchor
|
|
|
|
```
|