2022-02-22 07:16:49 -08:00
|
|
|
# ⚓ The Anchor Book
|
|
|
|
|
|
|
|
Get up and running with [Anchor](https://anchor-lang.com), the framework for building secure, reliable
|
|
|
|
Solana apps.
|
|
|
|
|
|
|
|
## 🤝 Contributing
|
|
|
|
|
|
|
|
Feel free to file an issue or submit a pull request.
|
|
|
|
|
2022-02-25 13:26:46 -08:00
|
|
|
## Programs
|
|
|
|
|
|
|
|
You can find the program examples used in the book in the [programs directory](./programs/).
|
|
|
|
|
2022-02-22 07:16:49 -08:00
|
|
|
## 💻 Run The Anchor Book Locally
|
|
|
|
|
|
|
|
To run on a Mac, install [Homebrew](https://brew.sh/) if you don't already have
|
|
|
|
it.
|
|
|
|
|
|
|
|
Then, run the following commands:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
brew upgrade
|
|
|
|
brew install mdbook
|
|
|
|
```
|
|
|
|
|
2022-02-22 09:50:45 -08:00
|
|
|
Next, clone this repo and and serve the book:
|
2022-02-22 07:16:49 -08:00
|
|
|
|
|
|
|
```sh
|
|
|
|
git clone https://github.com/project-serum/anchor-book.git
|
|
|
|
cd anchor-book
|
2022-02-22 09:50:45 -08:00
|
|
|
mdbook serve
|
2022-02-22 07:16:49 -08:00
|
|
|
```
|
2022-02-22 09:50:45 -08:00
|
|
|
The book will be available at `http://localhost:3000` in your browser.
|
2022-02-22 07:16:49 -08:00
|
|
|
|
2022-03-06 13:41:49 -08:00
|
|
|
### Run an older version
|
|
|
|
|
|
|
|
If you want to know how something worked in previous versions of anchor, you can check out
|
2022-03-06 13:56:25 -08:00
|
|
|
a branch e.g. branch `v0.21.0` is the branch with all commits of the book that were made before anchor `v0.22.0` was released.
|
2022-03-06 13:41:49 -08:00
|
|
|
|
2022-02-22 07:19:57 -08:00
|
|
|
## License
|
2022-02-22 07:16:49 -08:00
|
|
|
|
2022-02-22 07:19:57 -08:00
|
|
|
The Anchor Book is licensed under [Apache 2.0](./LICENSE).
|
|
|
|
|
|
|
|
Unless you explicitly state otherwise, any contribution intentionally submitted
|
|
|
|
for inclusion in Anchor by you, as defined in the Apache-2.0 license, shall be
|
|
|
|
licensed as above, without any additional terms or conditions.
|