---
title: Solana Programs
seoTitle: "How to create a Solana program (native or Anchor)"
description:
  "How to create a new Solana project scaffold for program development with the
  'create solana program' tool."
keywords:
  - solana development
  - create solana program
  - intro to solana development
  - projects on solana
  - solana program development
  - create a solana project
h1: Solana Program Scaffold
---

> This is a beta version of the [Solana Toolkit](/docs/toolkit/), and is
> still a WIP. Please post all feedback as a GitHub issue
> [here](https://github.com/solana-foundation/developer-content/issues/new?title=%5Btoolkit%5D%20).

```shell
pnpm create solana-program
```

[`create-solana-program`](https://github.com/solana-program/create-solana-program)
initializes an in-depth workspace with everything you need for general Solana
program development. This scaffold allows you to write either native rust
programs or Anchor programs.

## Program Frameworks

After running this command, you'll have the option to choose between Shank and
Anchor for the program framework:

- **Shank** creates a vanilla Solana smart contract with Shank macros to
  generate IDLs. For more information on Shank, read its
  [README](https://github.com/metaplex-foundation/shank).

- **Anchor** creates a smart contract using the Anchor framework, which
  abstracts away many complexities enabling fast program development. For more
  information on the Anchor framework, read the
  [Anchor book](https://www.anchor-lang.com/).

### Anchor framework

For **Anchor rust development**, chose Anchor when asked which program framework
to use. This will create a basic Anchor counter program with the following
project structure for your program:

```shell
├── program.rs
│   ├── src.rs
│   │   ├── lib.rs
│   ├── Cargo.toml
│   ├── keypair.json
│   ├── README.md
```

### Native rust

For **native rust development**, make sure you chose Shank when asked which
program framework to use. This will create a basic counter program with the
following project structure for your program:

```shell
├── program.rs
│   ├── src.rs
│   │   ├── assertions.rs
│   │   ├──entrypoint.rs
│   │   ├──error.rs
│   │   ├──instruction.rs
│   │   ├──lib.rs
│   │   ├──processor.rs
│   │   ├──state.rs
│   │   ├──utils.rs
│   ├── Cargo.toml
│   ├── keypair.json
│   ├── README.md
```

## Generated Clients

Next, you'll have the option to choose between a JavaScript client, a Rust
Client, or both.

- **JavaScript Client** creates a typescript library compatible with
  [web3.js](https://solana-labs.github.io/solana-web3.js/).

- **Rust Client** creates a rust crate allowing consumers to interact with the
  program.

For further workspace customization and additional information, check out the
`create-solana-program`
[README](https://github.com/solana-program/create-solana-program?tab=readme-ov-file).

## Build

After answering the above prompts, the workspace will be generated. To get
started, build your program and clients by running:

```shell
cd <my-program-name>
npm install
npm run generate
```

To update an existing Anchor project to have this scaffold, read this
[guide](/docs/toolkit/projects/existing-project).

## Additional Resources

- [Developing Rust Programs](/docs/programs/rust/)
- [Program Examples](https://github.com/solana-developers/program-examples)
