From 99bf2433a03281c2896a27e75139d7da0a2afec7 Mon Sep 17 00:00:00 2001 From: Drew Nutter Date: Mon, 4 Dec 2023 15:45:53 -0500 Subject: [PATCH] docs: readme organization --- readme.md | 71 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 36 insertions(+), 35 deletions(-) diff --git a/readme.md b/readme.md index 8e7c09add..c06737fb7 100644 --- a/readme.md +++ b/readme.md @@ -18,21 +18,19 @@ _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.
Dev Environment Recommendations -#### 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) @@ -40,7 +38,7 @@ These tools are optional but recommended for a smooth development process. - [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. @@ -109,40 +107,13 @@ To run the debugger, you need a run configuration. This launch.json includes an
-### ๐Ÿ”ง 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. -

- ## ๐Ÿš€ Run Run Sig with `zig` or execute the binary you already built: @@ -206,6 +177,36 @@ sig gossip --entrypoint 35.203.170.30:8001 \
+## 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 +``` +

+ + ## ๐Ÿ“ฆ 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.