kanidm/platform/crossbuild
James Hodgkinson bca2fbcf4e
Unix crossbuild scripts and docs (#2326)
* can build now with cargo cross
2023-11-27 06:30:21 +00:00
..
ubuntu-20.04 Unix crossbuild scripts and docs (#2326) 2023-11-27 06:30:21 +00:00
ubuntu-22.04 Unix crossbuild scripts and docs (#2326) 2023-11-27 06:30:21 +00:00
build.sh Unix crossbuild scripts and docs (#2326) 2023-11-27 06:30:21 +00:00
README.md Unix crossbuild scripts and docs (#2326) 2023-11-27 06:30:21 +00:00

Cross-building things using cargo cross

Here be dragons.

  1. Get a drink. You'l need it.
  2. Install cargo-cross
  3. Drink the drink.

Building Ubuntu 20.04 things

Make sure you're including --release because reasons.

CROSS_CONFIG=platform/crossbuild/ubuntu-20.04/Cross.toml \
    cross build --target aarch64-unknown-linux-gnu \
        --bin kanidm_unixd \
        --bin kanidm_unixd_tasks \
        --bin kanidm_ssh_authorizedkeys \
        --bin kanidm-unix \
        --release

Things will end up in ./target/aarch64-unknown-linux-gnu/release/

Building Ubuntu 22.04 things

Make sure you're including --release because reasons.

CROSS_CONFIG=platform/crossbuild/ubuntu-22.04/Cross.toml \
    cross build --target aarch64-unknown-linux-gnu \
        --bin kanidm_unixd \
        --bin kanidm_unixd_tasks \
        --bin kanidm_ssh_authorizedkeys \
        --bin kanidm-unix \
        --release

Things will end up in ./target/aarch64-unknown-linux-gnu/release/