Building the Extension
YARD has one extension, yard_x64.dll (yard_x64.so for Linux dedicated servers), written in Rust in the rust/ folder. It carries voice (client, and the voice server the Arma server hosts) and computes radio signal strength over the terrain. See rust/README.md for how the crates fit together.
Requirements
- Rust (stable; the toolchain and targets are pinned in
rust/rust-toolchain.toml) - CMake, to build the bundled Opus codec for release builds
- Windows: the Visual Studio C++ build tools (MSVC)
- Linux: ALSA headers (
libasound2-dev) for the client build - Linux server releases: cargo-zigbuild and Zig (
cargo install cargo-zigbuild,pip install --user ziglang)
Build
The release workflow builds everything for releases; build-extension.sh builds both binaries on Linux.
From the rust/ folder:
# Windows: the extension, and the wav2b64 tool shipped in extras/
cargo build --release -p acre2_ext -p acre2_tools --features acre2_voice_codec/bundled
# Linux dedicated server (no audio devices), linked against glibc 2.28
cargo zigbuild --release -p acre2_ext --target x86_64-unknown-linux-gnu.2.28 --no-default-features --features acre2_voice_codec/bundled
Copy target/release/yard.dll to the repository root as yard_x64.dll (or target/x86_64-unknown-linux-gnu/release/libyard.so as yard_x64.so), and wav2b64.exe to extras/.
Warning
Don’t ship a Linux
.sobuilt with plaincargo build: it needs the build machine’s glibc, and Arma servers on older distros can’t load it (Call extension 'yard' could not be loaded:with no reason). Check withobjdump -T yard_x64.so | grep -o 'GLIBC_[0-9.]*' | sort -uV | tail -1, which should printGLIBC_2.28.
Tests
cargo test --workspace
The signal propagation tests compare the Rust models with the original C++ ones on a real terrain (rust/acre/signal/tests/golden).
Tools
wav2b64 input.wav [output.b64]: converts a mono 16-bit 48 kHz WAV into a sound file forCfgAcreSounds.fakewrp: makes a.fakewrpterrain file for terrains whose WRP the extension can’t read. See Terrain Files.