diff options
| author | salmonik <salmonik@tuta.io> | 2026-10-29 23:20:07 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-10-29 23:20:07 +0100 |
| commit | d44f647e45745e1ce6073ec2a28dffb5887120dd (patch) | |
| tree | 5faccc829f087ed5abb38bd3f86cdf1497270c1f /docs | |
| parent | PLN changed to Kromer (diff) | |
| download | zagan-bet-d44f647e45745e1ce6073ec2a28dffb5887120dd.tar.gz zagan-bet-d44f647e45745e1ce6073ec2a28dffb5887120dd.zip | |
v3.1.1: make native-tls optional so the client cross-compiles without OpenSSL
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/TESTING.md | 24 |
1 files changed, 24 insertions, 0 deletions
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 | |||
| 9 | The suite is deterministic and headless: no network, no PTY, no sleeps, no | 9 | The suite is deterministic and headless: no network, no PTY, no sleeps, no |
| 10 | shared global database. Each test owns its state. | 10 | shared global database. Each test owns its state. |
| 11 | 11 | ||
| 12 | ## Cross-compiling the client | ||
| 13 | |||
| 14 | The client is rustls-only. The server is the only thing that links OpenSSL via | ||
| 15 | `native-tls`, so it is behind the default `server` feature. Building the client | ||
| 16 | for another target does not need that toolchain at all: | ||
| 17 | |||
| 18 | ```sh | ||
| 19 | rustup target add i686-unknown-linux-gnu | ||
| 20 | cargo build --release --bin client --no-default-features \ | ||
| 21 | --target i686-unknown-linux-gnu | ||
| 22 | ``` | ||
| 23 | |||
| 24 | `--no-default-features` drops `native-tls`, which is what fails with | ||
| 25 | `Could not find OpenSSL` when no 32-bit OpenSSL is installed. `rusqlite` is | ||
| 26 | bundled and `ring` (rustls) only needs `gcc -m32`, which a normal multilib | ||
| 27 | setup provides. The binary can be checked with | ||
| 28 | `file target/i686-unknown-linux-gnu/release/client`; it must say `ELF 32-bit` | ||
| 29 | and `Intel i386`. | ||
| 30 | |||
| 31 | Building the server for i686 is a different problem: it needs 32-bit OpenSSL | ||
| 32 | headers and libraries (`libssl-dev:i386` plus | ||
| 33 | `PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_LIBDIR=/usr/lib/i386-linux-gnu/pkgconfig`), | ||
| 34 | or a vendored OpenSSL. | ||
| 35 | |||
| 12 | | File | Covers | | 36 | | File | Covers | |
| 13 | | --- | --- | | 37 | | --- | --- | |
| 14 | | `tests/client_core.rs` | Client command/game flows via a headless screen applying logical effects. | | 38 | | `tests/client_core.rs` | Client command/game flows via a headless screen applying logical effects. | |
