From d611c590c7659473f0352b4462c53bac34b75997 Mon Sep 17 00:00:00 2001 From: Richard Patel Date: Sun, 30 Oct 2022 08:32:54 +0100 Subject: [PATCH] README.md: update and split install instructions to INSTALL.md --- INSTALL.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++ README.md | 56 ++++-------------------------------------------------- 2 files changed, 52 insertions(+), 52 deletions(-) create mode 100644 INSTALL.md diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 0000000..42d8c7c --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,48 @@ +## Building with Bazel + +Bazel manages Go and C/C++ toolchains and all dependencies. + +[Installation Guide](https://github.com/firedancer-io/firedancer/blob/main/bazel/README.md#installation) (Linux and macOS) + + bazel build //cmd/radiance + +## Building with Go + +Radiance commands can be built with standard Go tooling (Go >= 1.19 is required), +for example: + + go run go.firedancer.io/radiance/cmd/radiance + +By default, commands that require extra dependencies (e.g. RocksDB) are disabled. + +### With RocksDB + +> We recommend using Bazel for Cgo builds. + +Radiance tools that require direct access to the blockstore (such as `blockstore` and `car`) +require a working C toolchain and extra compiler arguments to link against rocksdb. + +You'll need a working C compiler toolchain as well as prerequisites listed +by [grocksdb](https://github.com/linxGnu/grocksdb#prerequisite) and +[RocksDB itself](https://github.com/linxGnu/grocksdb#prerequisite). + +For RHEL/Centos/Fedora: + + dnf -y install "@Development Tools" gflags-devel snappy snappy-devel zlib zlib-devel bzip2 bzip2-devel lz4-devel libzstd-devel + +First, check out the rocksdb submodule: + + git submodule update --init + +Then, build the rocksdb C library: + + cd third_party/rocksdb + make -j $(nproc) static_lib + cd - + +Finally, build the `radiance` command with the `rocksdb` tag: + + export CGO_CFLAGS="-I$(pwd)/third_party/rocksdb/include" + export CGO_LDFLAGS="-L$(pwd)/third_party/rocksdb" + + go run -tags=rocksdb go.firedancer.io/radiance/cmd/radiance diff --git a/README.md b/README.md index 070c372..9a599a2 100644 --- a/README.md +++ b/README.md @@ -1,56 +1,8 @@ # radiance ☀️ -Highly experimental Solana Go playground monorepo. +Assortment of Solana protocol modules written in Go. -⚠️ **No guarantees, no support, quite possibly no documentation either. -Ignore this repo unless you're ready to read and understand the code.** ⚠️ +⚠️ **No guarantees, no support.** +Check back later unless you're ready to read and understand the code. ⚠️ -## Available tooling - -- [radiance](cmd/radiance) - - `blockstore`: Solana validator RocksDB tool - - `dumpshreds`: Dump raw shreds from RocksDB - - `verifydata`: Check data integrity (parse every tx) - - `yaml`: Dump shreds, entries, txs as YAML - - `car`: IPLD Content Addressable Archives - - `create`: Create replayable CAR archives from validator RocksDB -- [solrays](cmd/solrays), an RPC proxy that exports call latency of a Solana RPC node. - -## Building - -Radiance commands can be built with standard Go tooling (Go >= 1.19 is required), -for example: - - go run go.firedancer.io/radiance/cmd/radiance - -By default, commands that require extra dependencies (e.g. RocksDB) are disabled. - -### With RocksDB - -Radiance tools that require direct access to the blockstore (such as `blockstore` and `car`) -require a working C toolchain and extra compiler arguments to link against rocksdb. - -You'll need a working C compiler toolchain as well as prerequisites listed -by [grocksdb](https://github.com/linxGnu/grocksdb#prerequisite) and -[RocksDB itself](https://github.com/linxGnu/grocksdb#prerequisite). - -For RHEL/Centos/Fedora: - - dnf -y install "@Development Tools" gflags-devel snappy snappy-devel zlib zlib-devel bzip2 bzip2-devel lz4-devel libzstd-devel - -First, check out the rocksdb submodule: - - git submodule update --init - -Then, build the rocksdb C library: - - cd third_party/rocksdb - make -j $(nproc) static_lib - cd - - -Finally, build the `radiance` command: - - export CGO_CFLAGS="-I$(pwd)/third_party/rocksdb/include" - export CGO_LDFLAGS="-L$(pwd)/third_party/rocksdb" - - go run -tags rocksdb go.firedancer.io/radiance/cmd/radiance +[![Go Reference](https://pkg.go.dev/badge/go.firedancer.io/radiance.svg)](https://pkg.go.dev/go.firedancer.io/radiance)