In order to compile HoraeDB, some relevant dependencies(including the Rust toolchain) should be installed.
Assuming the development environment is Ubuntu20.04, execute the following command to install the required dependencies:
sudo apt install git curl gcc g++ libssl-dev pkg-config cmake protobuf-compiler
It should be noted that the compilation of the project has version requirements for dependencies such as cmake, gcc, g++, etc. If your development environment is an old Linux distribution, it is necessary to manually install these dependencies of a higher version.
If the development environment is MacOS, execute the following command to install the required dependencies.
xcode-select --install
brew install cmake
brew install protobuf
Rust can be installed by rustup. After installing rustup, when entering the HoraeDB project, the specified Rust version will be automatically downloaded according to the rust-toolchain file.
After execution, you need to add environment variables to use the Rust toolchain. Basically, just put the following commands into your ~/.bashrc or ~/.bash_profile:
source $HOME/.cargo/env
Compile HoraeDB by the following command:
cargo build --release
Then you can run HoraeDB using the default configuration file provided in the codebase.
./target/release/horaedb-server --config ./docs/minimal.toml