Skip to content

Commit 28830a4

Browse files
committed
fix: add Pinocchio to README and rename Rust workflow
- Add Pinocchio to the subtitle and framework descriptions section. Pinocchio is a zero-copy, zero-allocation library for Solana programs with 13 example projects in basics/. - Add pinocchio links to all 13 basics examples that have them. - Add scheduled-run CI badge for the Pinocchio workflow (286 runs) matching the existing Anchor and Native badge style. - Rename 'Rust' workflow to 'Rust Lint' to clarify it only runs cargo fmt and clippy, not builds or tests, and to distinguish it from the 'Native' workflow.
1 parent c7ed3e2 commit 28830a4

File tree

2 files changed

+20
-16
lines changed

2 files changed

+20
-16
lines changed

.github/workflows/rust.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# The name of your workflow. GitHub displays the names of your workflows on your repository's "Actions" tab
2-
name: Rust
2+
name: Rust Lint
33

44
# To automatically trigger the workflow
55
on:

README.md

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Program Examples
22

3-
## Onchain program examples for :anchor: Anchor and :crab: Native Rust.
3+
## Onchain program examples for :anchor: Anchor, :crab: Native Rust, and :evergreen_tree: Pinocchio.
44

5-
[![Anchor](https://github.com/solana-developers/program-examples/actions/workflows/anchor.yml/badge.svg?event=schedule)](https://github.com/solana-developers/program-examples/actions/workflows/anchor.yml) [![Native](https://github.com/solana-developers/program-examples/actions/workflows/solana-native.yml/badge.svg?event=schedule)](https://github.com/solana-developers/program-examples/actions/workflows/solana-native.yml)
5+
[![Anchor](https://github.com/solana-developers/program-examples/actions/workflows/anchor.yml/badge.svg?event=schedule)](https://github.com/solana-developers/program-examples/actions/workflows/anchor.yml) [![Native](https://github.com/solana-developers/program-examples/actions/workflows/solana-native.yml/badge.svg?event=schedule)](https://github.com/solana-developers/program-examples/actions/workflows/solana-native.yml) [![Pinocchio](https://github.com/solana-developers/program-examples/actions/workflows/solana-pinocchio.yml/badge.svg?event=schedule)](https://github.com/solana-developers/program-examples/actions/workflows/solana-pinocchio.yml)
66

77
This repo contains Solana onchain programs (referred to as 'Smart Contracts' in other blockchains).
88

@@ -23,6 +23,10 @@ Each folder includes examples for one or more of the following:
2323
Build and test commands are defined via pnpm scripts and use `litesvm` for testing.
2424
Run `pnpm test` to execute tests.
2525

26+
- `pinocchio` - Written using [Pinocchio](https://github.com/febo/pinocchio), a zero-copy, zero-allocation library for Solana programs.
27+
Build and test commands are the same as native examples.
28+
Run `pnpm test` to execute tests.
29+
2630

2731
**If a given example is missing, please send us a PR to add it!** Our aim is to have every example available in every option. We'd also love to see more programs involving staking, wrapped tokens, oracles, compression and VRF. Follow the [contributing guidelines](./CONTRIBUTING.md) to keep things consistent.
2832

@@ -35,43 +39,43 @@ Each folder includes examples for one or more of the following:
3539

3640
[Hello World on Solana! A minimal program that logs a greeting.](./basics/hello-solana/README.md)
3741

38-
[anchor](./basics/hello-solana/anchor) [native](./basics/hello-solana/native)
42+
[anchor](./basics/hello-solana/anchor) [native](./basics/hello-solana/native) [pinocchio](./basics/hello-solana/pinocchio)
3943

4044
### Account-data
4145

4246
Store and retrieve data using Solana accounts.
4347

44-
[anchor](./basics/account-data/anchor) [native](./basics/account-data/native)
48+
[anchor](./basics/account-data/anchor) [native](./basics/account-data/native) [pinocchio](./basics/account-data/pinocchio)
4549

4650
### Storing global state - Counter
4751

4852
[Use a PDA to store global state, making a counter that increments when called.](./basics/counter/README.md)
4953

50-
[anchor](./basics/counter/anchor) [native](./basics/counter/native)
54+
[anchor](./basics/counter/anchor) [native](./basics/counter/native) [pinocchio](./basics/counter/pinocchio)
5155

5256
### Saving per-user state - Favorites
5357

5458
Save and update per-user state on the blockchain, ensuring users can only update their own information.
5559

56-
[anchor](./basics/favorites/anchor) [native](./basics/favorites/native)
60+
[anchor](./basics/favorites/anchor) [native](./basics/favorites/native) [pinocchio](./basics/favorites/pinocchio)
5761

5862
### Checking Instruction Accounts
5963

6064
[Check that the accounts provided in incoming instructions meet particular criteria.](./basics/checking-accounts/README.md)
6165

62-
[anchor](./basics/checking-accounts/anchor) [native](./basics/checking-accounts/native)
66+
[anchor](./basics/checking-accounts/anchor) [native](./basics/checking-accounts/native) [pinocchio](./basics/checking-accounts/pinocchio)
6367

6468
### Closing Accounts
6569

6670
Close an account and get the Lamports back.
6771

68-
[anchor](./basics/close-account/anchor) [native](./basics/close-account/native)
72+
[anchor](./basics/close-account/anchor) [native](./basics/close-account/native) [pinocchio](./basics/close-account/pinocchio)
6973

7074
### Creating Accounts
7175

7276
[Make new accounts on the blockchain.](./basics/create-account/README.md)
7377

74-
[anchor](./basics/create-account/anchor) [native](./basics/create-account/native)
78+
[anchor](./basics/create-account/anchor) [native](./basics/create-account/native) [pinocchio](./basics/create-account/pinocchio)
7579

7680
### Cross program invocations
7781

@@ -83,31 +87,31 @@ Close an account and get the Lamports back.
8387

8488
[Use a PDA to pay the rent for the creation of a new account.](./basics/pda-rent-payer/README.md)
8589

86-
[anchor](./basics/pda-rent-payer/anchor) [native](./basics/pda-rent-payer/native)
90+
[anchor](./basics/pda-rent-payer/anchor) [native](./basics/pda-rent-payer/native) [pinocchio](./basics/pda-rent-payer/pinocchio)
8791

8892
### Processing instructions
8993

9094
[Add parameters to an instruction handler and use them.](./basics/processing-instructions/README.md)
9195

92-
[anchor](./basics/processing-instructions/anchor) [native](./basics/processing-instructions/native)
96+
[anchor](./basics/processing-instructions/anchor) [native](./basics/processing-instructions/native) [pinocchio](./basics/processing-instructions/pinocchio)
9397

9498
### Storing date in program derived addresses
9599

96100
Store and retrieve state in Solana.
97101

98-
[anchor](./basics/program-derived-addresses/anchor) [native](./basics/program-derived-addresses/native)
102+
[anchor](./basics/program-derived-addresses/anchor) [native](./basics/program-derived-addresses/native) [pinocchio](./basics/program-derived-addresses/pinocchio)
99103

100104
### Handling accounts that expand in size
101105

102106
How to store state that changes size in Solana.
103107

104-
[anchor](./basics/realloc/anchor) [native](./basics/realloc/native)
108+
[anchor](./basics/realloc/anchor) [native](./basics/realloc/native) [pinocchio](./basics/realloc/pinocchio)
105109

106110
### Calculating account size to determine rent
107111

108112
[Determine the necessary minimum rent by calculating an account's size.](./basics/rent/README.md)
109113

110-
[anchor](./basics/rent/anchor) [native](./basics/rent/native)
114+
[anchor](./basics/rent/anchor) [native](./basics/rent/native) [pinocchio](./basics/rent/pinocchio)
111115

112116
### Laying out larger programs
113117

@@ -119,7 +123,7 @@ How to store state that changes size in Solana.
119123

120124
[Send SOL between two accounts.](./basics/transfer-sol/README.md)
121125

122-
[anchor](./basics/transfer-sol/anchor) [native](./basics/transfer-sol/native)
126+
[anchor](./basics/transfer-sol/anchor) [native](./basics/transfer-sol/native) [pinocchio](./basics/transfer-sol/pinocchio)
123127

124128
</details>
125129
<details>

0 commit comments

Comments
 (0)