Skip to content

Commit a2a3a88

Browse files
committed
feat: verifiable-build.toml to specify solana version
1 parent 9183f08 commit a2a3a88

File tree

7 files changed

+399
-65
lines changed

7 files changed

+399
-65
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ Verified builds allow developers and users to verify that a deployed Solana prog
2525
solana-verify build
2626
```
2727

28+
For minimal programs that do not depend on `solana-program`, add a
29+
`verifiable-build.toml` file at the program root:
30+
31+
```toml
32+
solana_version = "2.1.8"
33+
```
34+
35+
If `--base-image` is provided, `verifiable-build.toml` is ignored.
36+
2837
3. Deploy and verify:
2938

3039
```bash

examples/hello_world_pinocchio/Cargo.lock

Lines changed: 174 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[package]
2+
name = "hello_world"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
[lib]
7+
crate-type = ["cdylib", "lib"]
8+
name = "hello_world"
9+
10+
[dependencies]
11+
pinocchio = "0.10.1"
12+
solana-program-log = "1.1.0"
13+
14+
[lints.rust]
15+
unexpected_cfgs = { level = "warn", check-cfg = [
16+
'cfg(target_os, values("solana"))',
17+
] }
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
use pinocchio::{program_entrypoint, AccountView, Address, ProgramResult};
2+
use solana_program_log::log;
3+
4+
program_entrypoint!(process_instruction);
5+
6+
fn process_instruction(
7+
_program_id: &Address,
8+
_accounts: &[AccountView],
9+
_instruction_data: &[u8],
10+
) -> ProgramResult {
11+
log("Hello, world!");
12+
Ok(())
13+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
solana_version = "3.0.7"

0 commit comments

Comments
 (0)