-
Notifications
You must be signed in to change notification settings - Fork 61
Compiling for yourself
Peter Gervai edited this page Nov 19, 2025
·
2 revisions
You can compile the main branch, but that is probably unnecessary since it is already in the releases.
However if you choose to follow the dev branch (which is generally safe for testing/private use) you may want to compile it. Doing that in the generic case is rather simple:
- Set up usual rust environment (installing Rust aka
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh) - Get source, enter source dir
cargo build --release- the result is in
./targets/release/tuwunel
That's it.
The default version is rather terse, even the INFO/WARNING logs contain only basic information about events and problems. You can use a -logging release (from Releases), or you can compile one for yourself. Right now (as of November, 2025) it needs a slightly ugly command:
cargo build --release --no-default-features --features "blurhashing,brotli_compression,bzip2_compression,console,direct_tls,element_hacks,gzip_compression,io_uring,jemalloc,jemalloc_conf,jemalloc_prof,jemalloc_stats,ldap,lz4_compression,media_thumbnail,perf_measurements,sentry_telemetry,systemd,tokio_console,tuwunel_mods,url_preview,zstd_compression"- you may also set evironment variable
RUSTFLAGS="--cfg tokio_unstable -Ctarget-cpu=native"if you compile for the same architecture (same machine).