Wasmtime: build release artifacts with all-arch. (#5657)

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.
This commit is contained in:
Chris Fallin
2023-01-30 14:58:30 -08:00
committed by GitHub
parent ffcd61b520
commit f488d93c5a

View File

@@ -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