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:
bash
git clone https://github.com/mycrl/turn-rsBuild Workspace
Compile the entire workspace in release mode:
bash
cd turn-rs
cargo build --releaseYou 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:
bash
export RUSTFLAGS='-C target-cpu=native'Features
If you don't need a particular feature, you can reduce the package size by enabling only the features you require.
udp- Enables UDP transport layer support.tcp- Enables TCP transport layer support.ssl- Enable TLS encryption support.api- Enable the gRPC api server feature.prometheus- Enable prometheus support.
NOTE
For the data plane, enabling server.interfaces.ssl on a TCP interface turns it into TLS; the UDP transport does not support ssl.
All features are enabled by default.
bash
cargo build --releaseAfter the compilation is complete, you can find the binary file in the target/release directory.