Skip to content

Commit

Permalink
README: Add info about what this is
Browse files Browse the repository at this point in the history
  • Loading branch information
joncinque committed Sep 5, 2024
1 parent c1610a7 commit 0f5c424
Showing 1 changed file with 72 additions and 0 deletions.
72 changes: 72 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,74 @@
# solana-program-rosetta

Multiple implementations of Solana programs across languages

More programs will be added over time!

## Getting started

### Prerequisite for all languages

* Install Rust: https://www.rust-lang.org/tools/install

### Rust

* Install Solana tools

```console
./install-solana.sh
```

* Go to a program directory

```console
cd helloworld
```

* Build a program

```console
cargo build-sbf
```

* Test a program

```console
cargo test-sbf
```

### Zig

* Get the compiler

```console
./install-solana-zig.sh
```

* Go to the Zig implementation of a program

```console
cd helloworld/zig
```

* Build the program

```console
../../solana-zig/zig build
```

* Test it

```console
cd ..
SBF_OUT_DIR="./zig/zig-out/lib" cargo test"
```

* OR use the helper from the root of this repo to build and test

```console
./test-zig helloworld
```

## Current Programs

* Helloworld: logs a static string using the `sol_log_` syscall

0 comments on commit 0f5c424

Please sign in to comment.