Skip to content

Commit

Permalink
docs: readme organization
Browse files Browse the repository at this point in the history
  • Loading branch information
dnut committed Dec 4, 2023
1 parent c286d2c commit 99bf243
Showing 1 changed file with 36 additions and 35 deletions.
71 changes: 36 additions & 35 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,27 @@ _Sig_ is a Solana validator client implementation written in Zig. Read the [intr

⚠️ NOTE: This is a WIP, please open any issues for any bugs/improvements.

## Development

### 📦 Setup
## 📦 Setup

Zig 0.11.0 is required to build Sig.

<details><summary>Dev Environment Recommendations</summary>

#### Build Dependencies
### Build Dependencies
- Zig 0.11.0 - Choose one:
- [Binary Releases](https://ziglang.org/download/) (extract and add to PATH)
- [Install with a package manager](https://github.com/ziglang/zig/wiki/Install-Zig-from-a-Package-Manager)
- Manage multiple versions with [zigup](https://github.com/marler8997/zigup) or [zvm](https://www.zvm.app/)

#### Developer Tools
### Developer Tools
These tools are optional but recommended for a smooth development process.

- [Zig Language Server (ZLS) 0.11.0](https://github.com/zigtools/zls/wiki/Installation)
- [lldb](https://lldb.llvm.org/): [Zig CLI Debugging](https://devlog.hexops.com/2022/debugging-undefined-behavior/)
- [Zig Language](https://marketplace.visualstudio.com/items?itemName=ziglang.vscode-zig) VS Code extension
- [CodeLLDB](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb) VS Code extension

##### Visual Studio Code
#### Visual Studio Code

If you use VS Code, you should install the [Zig Language](https://marketplace.visualstudio.com/items?itemName=ziglang.vscode-zig) extension. It can use your installed versions of Zig and ZLS, or it can download and manage its own internal versions.

Expand Down Expand Up @@ -109,40 +107,13 @@ To run the debugger, you need a run configuration. This launch.json includes an

</details>

### 🔧 Build

```bash
zig build
```

### 🧪 Test
Run all tests.
```bash
zig build test
```

Include `--summary all` with any test command to see a summary of the test results.

Include a filter to limit which tests are run. Sig tests include their module name. For example, you can run all tests in `gossip.crds_table` like this:
```bash
zig build test --summary all -- gossip.crds_table
```

### 📊 Benchmark
Run all benchmarks.
```bash
zig build benchmark
```
## 🔧 Build

Run a benchmark group: socket_utils, gossip, or sync.
```bash
zig build benchmark -- gossip
zig build
```

### Code
See [CONTRIBUTING.md](docs/CONTRIBUTING.md) for the code style guide.
<br><br>

## 🚀 Run

Run Sig with `zig` or execute the binary you already built:
Expand Down Expand Up @@ -206,6 +177,36 @@ sig gossip --entrypoint 35.203.170.30:8001 \
</details>
<br>

## Develop

See [Setup](#-setup) for information about setting up your development environment. See [CONTRIBUTING.md](docs/CONTRIBUTING.md) for the code style guide.

### 🧪 Test
Run all tests.
```bash
zig build test
```

Include `--summary all` with any test command to see a summary of the test results.

Include a filter to limit which tests are run. Sig tests include their module name. For example, you can run all tests in `gossip.crds_table` like this:
```bash
zig build test --summary all -- gossip.crds_table
```

### 📊 Benchmark
Run all benchmarks.
```bash
zig build benchmark
```

Run a benchmark group: socket_utils, gossip, or sync.
```bash
zig build benchmark -- gossip
```
<br><br>


## 📦 Import Sig

Sig can be included as a dependency in your Zig project using `build.zig.zon` file (available for Zig >= 0.11). See the [API documentation](docs/api.md) to learn more about how to use Sig as a library.
Expand Down

0 comments on commit 99bf243

Please sign in to comment.