You need to install the Rust toolchain, if you have already installed it, you can skip it, Install Rust, then get the source code:
git clone https://github.com/mycrl/turn-rs
Compile the entire workspace in release mode:
cd turn-rs
cargo build --release
You can enable target CPU optimizations, which will enable optimizations based on your current CPU. This can be easily enabled by adding an environment variable before compiling:
export RUSTFLAGS='-C target-cpu=native'
After the compilation is complete, you can find the binary file in the target/release
directory.
hooks
- Enable the HTTP Hooks feature.api
- Enable the HTTP REST API server feature.mimalloc
- Enable the mimalloc memory allocator.prometheus
- Enable prometheus indicator support.
No features are enabled by default and need to be turned on by manual specification.
cargo build --release --features api,hooks,mimalloc