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-rsCompile the entire workspace in release mode:
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:
export RUSTFLAGS='-C target-cpu=native'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.
cargo build --releaseAfter the compilation is complete, you can find the binary file in the target/release directory.