Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 1.01 KB

build.md

File metadata and controls

39 lines (26 loc) · 1.01 KB

Build

Prerequisites

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

Build Workspace

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.

Features

  • 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