mirror of
				https://github.com/XRPLF/clio.git
				synced 2025-11-04 11:55:51 +00:00 
			
		
		
		
	docs: Improve wording (#2095)
Co-authored-by: Maria Shodunke <maria-robobug@users.noreply.github.com>
This commit is contained in:
		@@ -1,12 +1,13 @@
 | 
			
		||||
# How to build Clio
 | 
			
		||||
 | 
			
		||||
Clio is built with [CMake](https://cmake.org/) and uses [Conan](https://conan.io/) for managing dependencies. It is written in C++20 and therefore requires a modern compiler.
 | 
			
		||||
`Clio` is built with [CMake](https://cmake.org/) and uses [Conan](https://conan.io/) for managing dependencies.
 | 
			
		||||
`Clio` is written in C++23 and therefore requires a modern compiler.
 | 
			
		||||
 | 
			
		||||
## Minimum Requirements
 | 
			
		||||
 | 
			
		||||
- [Python 3.7](https://www.python.org/downloads/)
 | 
			
		||||
- [Conan 1.55](https://conan.io/downloads.html)
 | 
			
		||||
- [CMake 3.20](https://cmake.org/download/)
 | 
			
		||||
- [Conan 1.55, <2.0](https://conan.io/downloads.html)
 | 
			
		||||
- [CMake 3.20, <4.0](https://cmake.org/download/)
 | 
			
		||||
- [**Optional**] [GCovr](https://gcc.gnu.org/onlinedocs/gcc/Gcov.html): needed for code coverage generation
 | 
			
		||||
- [**Optional**] [CCache](https://ccache.dev/): speeds up compilation if you are going to compile Clio often
 | 
			
		||||
 | 
			
		||||
@@ -18,7 +19,7 @@ Clio is built with [CMake](https://cmake.org/) and uses [Conan](https://conan.io
 | 
			
		||||
 | 
			
		||||
### Conan Configuration
 | 
			
		||||
 | 
			
		||||
Clio does not require anything other than `compiler.cppstd=20` in your (`~/.conan/profiles/default`) Conan profile.
 | 
			
		||||
Clio requires `compiler.cppstd=20` in your Conan profile (`~/.conan/profiles/default`).
 | 
			
		||||
 | 
			
		||||
> [!NOTE]
 | 
			
		||||
> Although Clio is built using C++23, it's required to set `compiler.cppstd=20` for the time being as some of Clio's dependencies are not yet capable of building under C++23.
 | 
			
		||||
@@ -80,7 +81,8 @@ Navigate to Clio's root directory and run:
 | 
			
		||||
 | 
			
		||||
```sh
 | 
			
		||||
mkdir build && cd build
 | 
			
		||||
conan install .. --output-folder . --build missing --settings build_type=Release -o tests=True -o lint=False
 | 
			
		||||
conan install .. --output-folder . --build missing --settings build_type=Release -o tests=True
 | 
			
		||||
# You can also add -GNinja to use Ninja build system instead of Make
 | 
			
		||||
cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release ..
 | 
			
		||||
cmake --build . --parallel 8 # or without the number if you feel extra adventurous
 | 
			
		||||
```
 | 
			
		||||
@@ -100,7 +102,7 @@ If successful, `conan install` will find the required packages and `cmake` will
 | 
			
		||||
 | 
			
		||||
### Generating API docs for Clio
 | 
			
		||||
 | 
			
		||||
The API documentation for Clio is generated by [Doxygen](https://www.doxygen.nl/index.html). If you want to generate the API documentation when building Clio, make sure to install Doxygen on your system.
 | 
			
		||||
The API documentation for Clio is generated by [Doxygen](https://www.doxygen.nl/index.html). If you want to generate the API documentation when building Clio, make sure to install Doxygen 1.12.0 on your system.
 | 
			
		||||
 | 
			
		||||
To generate the API docs:
 | 
			
		||||
 | 
			
		||||
@@ -108,7 +110,7 @@ To generate the API docs:
 | 
			
		||||
 | 
			
		||||
   ```sh
 | 
			
		||||
   mkdir build && cd build
 | 
			
		||||
   conan install .. --output-folder . --build missing --settings build_type=Release -o tests=True -o lint=False -o docs=True
 | 
			
		||||
   conan install .. --output-folder . --build missing --settings build_type=Release -o tests=True -o docs=True
 | 
			
		||||
   ```
 | 
			
		||||
 | 
			
		||||
2. Once that has completed successfully, run the `cmake` command and add the `--target docs` option:
 | 
			
		||||
@@ -132,7 +134,7 @@ It is also possible to build Clio using [Docker](https://www.docker.com/) if you
 | 
			
		||||
docker run -it ghcr.io/xrplf/clio-ci:latest
 | 
			
		||||
git clone https://github.com/XRPLF/clio
 | 
			
		||||
mkdir build && cd build
 | 
			
		||||
conan install .. --output-folder . --build missing --settings build_type=Release -o tests=True -o lint=False
 | 
			
		||||
conan install .. --output-folder . --build missing --settings build_type=Release -o tests=True
 | 
			
		||||
cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release ..
 | 
			
		||||
cmake --build . --parallel 8 # or without the number if you feel extra adventurous
 | 
			
		||||
```
 | 
			
		||||
@@ -148,7 +150,8 @@ If you wish to develop against a `rippled` instance running in standalone mode t
 | 
			
		||||
 | 
			
		||||
Sometimes, during development, you need to build against a custom version of `libxrpl`. (For example, you may be developing compatibility for a proposed amendment that is not yet merged to the main `rippled` codebase.) To build Clio with compatibility for a custom fork or branch of `rippled`, follow these steps:
 | 
			
		||||
 | 
			
		||||
1. First, pull/clone the appropriate `rippled` fork and switch to the branch you want to build. For example, the following example uses an in-development build with [XLS-33d Multi-Purpose Tokens](https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0033d-multi-purpose-tokens):
 | 
			
		||||
1. First, pull/clone the appropriate `rippled` fork and switch to the branch you want to build.
 | 
			
		||||
   The following example uses an in-development build with [XLS-33d Multi-Purpose Tokens](https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0033d-multi-purpose-tokens):
 | 
			
		||||
 | 
			
		||||
   ```sh
 | 
			
		||||
   git clone https://github.com/shawnxie999/rippled/
 | 
			
		||||
@@ -168,14 +171,15 @@ Sometimes, during development, you need to build against a custom version of `li
 | 
			
		||||
 | 
			
		||||
   ```py
 | 
			
		||||
   # ... (excerpt from conanfile.py)
 | 
			
		||||
       requires = [
 | 
			
		||||
       'boost/1.82.0',
 | 
			
		||||
   requires = [
 | 
			
		||||
       'boost/1.83.0',
 | 
			
		||||
       'cassandra-cpp-driver/2.17.0',
 | 
			
		||||
       'fmt/10.1.1',
 | 
			
		||||
       'protobuf/3.21.9',
 | 
			
		||||
       'grpc/1.50.1',
 | 
			
		||||
       'openssl/1.1.1u',
 | 
			
		||||
       'openssl/1.1.1v',
 | 
			
		||||
       'xrpl/2.3.0-b1@my/feature', # Update this line
 | 
			
		||||
       'zlib/1.3.1',
 | 
			
		||||
       'libbacktrace/cci.20210118'
 | 
			
		||||
   ]
 | 
			
		||||
   ```
 | 
			
		||||
@@ -188,14 +192,14 @@ Sometimes, during development, you need to build against a custom version of `li
 | 
			
		||||
 | 
			
		||||
The minimum [clang-tidy](https://clang.llvm.org/extra/clang-tidy/) version required is 19.0.
 | 
			
		||||
 | 
			
		||||
Clang-tidy can be run by Cmake when building the project. To achieve this, you just need to provide the option `-o lint=True` for the `conan install` command:
 | 
			
		||||
Clang-tidy can be run by CMake when building the project. To achieve this, you just need to provide the option `-o lint=True` for the `conan install` command:
 | 
			
		||||
 | 
			
		||||
```sh
 | 
			
		||||
conan install .. --output-folder . --build missing --settings build_type=Release -o tests=True -o lint=True
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
By default Cmake will try to find `clang-tidy` automatically in your system.
 | 
			
		||||
To force Cmake to use your desired binary, set the `CLIO_CLANG_TIDY_BIN` environment variable to the path of the `clang-tidy` binary. For example:
 | 
			
		||||
By default CMake will try to find `clang-tidy` automatically in your system.
 | 
			
		||||
To force CMake to use your desired binary, set the `CLIO_CLANG_TIDY_BIN` environment variable to the path of the `clang-tidy` binary. For example:
 | 
			
		||||
 | 
			
		||||
```sh
 | 
			
		||||
export CLIO_CLANG_TIDY_BIN=/opt/homebrew/opt/llvm@19/bin/clang-tidy
 | 
			
		||||
 
 | 
			
		||||
@@ -4,17 +4,17 @@
 | 
			
		||||
> This is only an example of Grafana dashboard for Clio. It was created for demonstration purposes only and may contain errors.
 | 
			
		||||
> Clio team would not recommend to relate on data from this dashboard or use it for monitoring your Clio instances.
 | 
			
		||||
 | 
			
		||||
This directory contains an example of docker based infrastructure to collect and visualise metrics from clio.
 | 
			
		||||
This directory contains an example of docker based infrastructure to collect and visualize metrics from clio.
 | 
			
		||||
 | 
			
		||||
The structure of the directory:
 | 
			
		||||
 | 
			
		||||
- `compose.yaml`
 | 
			
		||||
  Docker-compose file with Prometheus and Grafana set up.
 | 
			
		||||
  Docker Compose file with Prometheus and Grafana set up.
 | 
			
		||||
- `prometheus.yaml`
 | 
			
		||||
  Defines metrics collection from Clio and Prometheus itself.
 | 
			
		||||
  Demonstrates how to setup Clio target and Clio's admin authorisation in Prometheus.
 | 
			
		||||
  Demonstrates how to setup Clio target and Clio's admin authorization in Prometheus.
 | 
			
		||||
- `grafana/clio_dashboard.json`
 | 
			
		||||
  Json file containing preconfigured dashboard in Grafana format.
 | 
			
		||||
  Json file containing pre-configured dashboard in Grafana format.
 | 
			
		||||
- `grafana/dashboard_local.yaml`
 | 
			
		||||
  Grafana configuration file defining the directory to search for dashboards json files.
 | 
			
		||||
- `grafana/datasources.yaml`
 | 
			
		||||
@@ -22,9 +22,9 @@ The structure of the directory:
 | 
			
		||||
 | 
			
		||||
## How to try
 | 
			
		||||
 | 
			
		||||
1. Make sure you have `docker` and `docker-compose` installed.
 | 
			
		||||
2. Run `docker-compose up -d` from this directory. It will start docker containers with Prometheus and Grafana.
 | 
			
		||||
1. Make sure you have Docker (with `Docker Compose`) installed.
 | 
			
		||||
2. Run `docker compose up -d` from this directory. It will start docker containers with Prometheus and Grafana.
 | 
			
		||||
3. Open [http://localhost:3000/dashboards](http://localhost:3000/dashboards). Grafana login `admin`, password `grafana`.
 | 
			
		||||
   There will be preconfigured Clio dashboard.
 | 
			
		||||
   There will be pre-configured Clio dashboard.
 | 
			
		||||
 | 
			
		||||
If Clio is not running yet launch Clio to see metrics. Some of the metrics may appear only after requests to Clio.
 | 
			
		||||
 
 | 
			
		||||
@@ -4,10 +4,10 @@
 | 
			
		||||
 | 
			
		||||
- Access to a Cassandra cluster or ScyllaDB cluster. Can be local or remote.
 | 
			
		||||
 | 
			
		||||
  > [!IMPORTANT]
 | 
			
		||||
  > There are some key considerations when using **ScyllaDB**. By default, Scylla reserves all free RAM on a machine for itself. If you are running `rippled` or other services on the same machine, restrict its memory usage using the `--memory` argument.
 | 
			
		||||
  >
 | 
			
		||||
  > See [ScyllaDB in a Shared Environment](https://docs.scylladb.com/getting-started/scylla-in-a-shared-environment/) to learn more.
 | 
			
		||||
> [!IMPORTANT]
 | 
			
		||||
> There are some key considerations when using **ScyllaDB**. By default, Scylla reserves all free RAM on a machine for itself. If you are running `rippled` or other services on the same machine, restrict its memory usage using the `--memory` argument.
 | 
			
		||||
>
 | 
			
		||||
> See [ScyllaDB in a Shared Environment](https://docs.scylladb.com/getting-started/scylla-in-a-shared-environment/) to learn more.
 | 
			
		||||
 | 
			
		||||
- Access to one or more `rippled` nodes. Can be local or remote.
 | 
			
		||||
 | 
			
		||||
@@ -92,4 +92,4 @@ To completely disable Prometheus metrics add `"prometheus": { "enabled": false }
 | 
			
		||||
 | 
			
		||||
It is important to know that Clio responds to Prometheus request only if they are admin requests. If you are using the admin password feature, the same password should be provided in the Authorization header of Prometheus requests.
 | 
			
		||||
 | 
			
		||||
You can find an example docker-compose file, with Prometheus and Grafana configs, in [examples/infrastructure](../docs/examples/infrastructure/).
 | 
			
		||||
You can find an example Docker Compose file, with Prometheus and Grafana configs, in [examples/infrastructure](../docs/examples/infrastructure/).
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user