Compile
In order to compile HoraeDB, some relevant dependencies(including the Rust
toolchain) should be installed.
Dependencies
Ubuntu
Assuming the development environment is Ubuntu20.04, execute the following command to install the required dependencies:
|
|
macOS
If the development environment is MacOS, execute the following command to install the required dependencies.
- Install command line tools:
|
|
- Install protobuf:
|
|
Rust
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
:
|
|
Compile and Run
horaedb-server
Compile horaedb-server by the following command in project root directory:
cargo build
Then you can run it using the default configuration file provided in the codebase.
|
|
Tips
When compiling on macOS, you may encounter following errors:
IO error: while open a file for lock: /var/folders/jx/grdtrdms0zl3hy6zp251vjh80000gn/T/.tmpmFOAF9/manifest/LOCK: Too many open files
or
error: could not compile `regex-syntax` (lib)
warning: build failed, waiting for other jobs to finish...
LLVM ERROR: IO failure on output stream: File too large
error: could not compile `syn` (lib)
To fix those, you should adjust ulimit as follows:
|
|
horaemeta-server
Building horaemeta-server require Golang version >= 1.21, please install it before compile.
Then in horaemeta
directory, execute:
|
|
Then you can run horaemeta-server like this:
|
|