create-solana-starter is a command-line tool that initializes a new Solana project for you so you can skip tedious manual steps and go straight to coding.
- Node.js v18.12.1
- Run
corepack enable
afterwards to enable the Yarn package manager (required byanchor-cli
).
- Run
- rustc 1.65.0 (897e37553 2022-11-02)
- On macOS, you may need to go into
System Settings -> Privacy & Security -> Security
to dismiss the security warning several times before Rust will install successfully.
- On macOS, you may need to go into
- solana-cli 1.14.16 (src:ab6f3bda; feat:3488713414)
- Do not use Homebrew, because it won't install
solana-test-validator 1.14.16 (src:ab6f3bda; feat:3488713414)
.
- Do not use Homebrew, because it won't install
- anchor-cli 0.27.0
- There seems to be an issue with
avm
; it's better if you install directly withcargo
.
- There seems to be an issue with
- git version 2.37.1
- Run
npx create-solana-starter@latest my-solana-app
to initialize the project. - Start the Solana backend with
cd my-solana-app && npm start
. - Start the Next.js frontend with
cd my-solana-app && npm run next
. - Make changes to
lib.rs
and watch the console. - Press
Ctrl+C
to stop the tasks once you're done.
- Run via
npx
. No explicit installation required. - Initializes an Anchor project with
anchor init
. - Generates a shareable wallet for development purposes (do not use on mainnet!!!) with
solana-keygen
. - Generates Anchor source code with a valid program ID.
- An npm script to (re)build and init/upgrade the on-chain program/IDL anytime.
- An interface definition (IDL) is needed by frontends.
- A
lib.rs
file watcher that runs the above-mentioned script automatically on changes. - A second npm script to do lots of heavy lifting (start the test validator & file watcher, give you some SOL so that you can actually deploy, etc.)
- Two more npm scripts for long-to-type Anchor commands.
- An Anchor script that verifies that there's actually a valid program at the program ID.
- Verbose output so that you can actually understand what's going on under the hood.
create-solana-starter
output is bright green, while that of the commands it calls is (generally) white.
- There's a Next.js frontend in
app
that connects to our test validator. - The code in
lib.rs
lets you store an arbitrary signed integer on-chain. - Interact with the Solana program (storing and retrieving an arbitrary number) in the frontend.
- Add tests for the number storage and retrieval feature.
- Choose between different templates (e.g. Anchor or Seahorse).
- Real-time CLI output.
- Right now, there's only output after the respective command (e.g.
anchor build
) has completed. That may take a minute or two.
- Right now, there's only output after the respective command (e.g.