From d44f647e45745e1ce6073ec2a28dffb5887120dd Mon Sep 17 00:00:00 2001 From: salmonik Date: Thu, 29 Oct 2026 23:20:07 +0100 Subject: v3.1.1: make native-tls optional so the client cross-compiles without OpenSSL --- docs/TESTING.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'docs') diff --git a/docs/TESTING.md b/docs/TESTING.md index 0c931d8..c68b6c4 100644 --- a/docs/TESTING.md +++ b/docs/TESTING.md @@ -9,6 +9,30 @@ cargo test The suite is deterministic and headless: no network, no PTY, no sleeps, no shared global database. Each test owns its state. +## Cross-compiling the client + +The client is rustls-only. The server is the only thing that links OpenSSL via +`native-tls`, so it is behind the default `server` feature. Building the client +for another target does not need that toolchain at all: + +```sh +rustup target add i686-unknown-linux-gnu +cargo build --release --bin client --no-default-features \ + --target i686-unknown-linux-gnu +``` + +`--no-default-features` drops `native-tls`, which is what fails with +`Could not find OpenSSL` when no 32-bit OpenSSL is installed. `rusqlite` is +bundled and `ring` (rustls) only needs `gcc -m32`, which a normal multilib +setup provides. The binary can be checked with +`file target/i686-unknown-linux-gnu/release/client`; it must say `ELF 32-bit` +and `Intel i386`. + +Building the server for i686 is a different problem: it needs 32-bit OpenSSL +headers and libraries (`libssl-dev:i386` plus +`PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_LIBDIR=/usr/lib/i386-linux-gnu/pkgconfig`), +or a vendored OpenSSL. + | File | Covers | | --- | --- | | `tests/client_core.rs` | Client command/game flows via a headless screen applying logical effects. | -- cgit v1.2.3