From 6d93145f76793e3aaaae56e5d0092eb73244494c Mon Sep 17 00:00:00 2001 From: Chris Fallin Date: Mon, 30 Jan 2023 13:19:25 -0800 Subject: [PATCH] Wasmtime: build release artifacts with `all-arch`. This allows the `wasmtime` binary provided in our release artifacts to cross-compile: `wasmtime compile` can build a `.cwasm` for any platform that Wasmtime supports, not just the host platform. This may be useful in some deployment scenarios. We don't turn on `all-arch` by default because it increases build time and binary size of Wasmtime itself, and other embedders of the `wasmtime` crate won't necessarily want this; hence, we set it only as part of the CI build configuration. Fixes #5655. --- .github/workflows/build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0a332e7c2e32..48a300e78eb2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -68,8 +68,9 @@ jobs: rustup target add ${{ matrix.target }} if: matrix.target != '' - # Build `wasmtime` and executables - - run: $CENTOS cargo build --release --bin wasmtime + # Build `wasmtime` and executables. Note that we include `all-arch` so our + # release artifacts can be used to compile `.cwasm`s for other targets. + - run: $CENTOS cargo build --release --bin wasmtime --features all-arch # Build `libwasmtime.so` - run: $CENTOS cargo build --release --manifest-path crates/c-api/Cargo.toml