From a4ca2eb9b3d6ba04626ca11e539b58c78e8a8554 Mon Sep 17 00:00:00 2001 From: bkioshn Date: Thu, 25 Sep 2025 16:15:21 +0700 Subject: [PATCH 1/2] fix: libc header not found when build wasm-wasip2 in arm Signed-off-by: bkioshn --- hermes/apps/athena/modules/Earthfile | 13 ++++++++++++- wasm/wasi/Earthfile | 3 +++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/hermes/apps/athena/modules/Earthfile b/hermes/apps/athena/modules/Earthfile index f5016bfb8..9c4467b3f 100644 --- a/hermes/apps/athena/modules/Earthfile +++ b/hermes/apps/athena/modules/Earthfile @@ -138,4 +138,15 @@ save-local-hermes: # Save the binary to local filesystem for development use # This makes it available at ./hermes in the calling directory - SAVE ARTIFACT hermes AS LOCAL ./hermes \ No newline at end of file + SAVE ARTIFACT hermes AS LOCAL ./hermes + +# Build wasm32-wasip2 for each modules +modules-build-wasm32-wasip2: + BUILD ./rbac-registration+build-rbac-registration + BUILD ./rbac-registration-indexer+build-rbac-registration-indexer + BUILD ./http-proxy+build-http-proxy + +# Run build modules wasm32-wasip2 for the specify architect +# Comment this out if it take long time for CI to build. +build-all-host-modules-build-wasm32-wasip2: + BUILD --platform=linux/amd64 --platform=linux/arm64 +modules-build-wasm32-wasip2 diff --git a/wasm/wasi/Earthfile b/wasm/wasi/Earthfile index 64eeff73a..3cfeb78bc 100644 --- a/wasm/wasi/Earthfile +++ b/wasm/wasi/Earthfile @@ -94,6 +94,9 @@ BUILD_RUST_COMPONENT: COPY --keep-ts --dir src . COPY Cargo.toml . + # Fix missing header error when compiling zstd while building rbac-registration + ENV CFLAGS_wasm32_wasip2="--sysroot=/usr/aarch64-linux-gnu" + DO rust-ci+CARGO \ --args "build --target wasm32-wasip2 --release" \ --output="wasm32-wasip2/release/$out" From 9aeb3cf2738f6cef3628d8b6c44b51450cc99466 Mon Sep 17 00:00:00 2001 From: bkioshn Date: Thu, 25 Sep 2025 16:27:12 +0700 Subject: [PATCH 2/2] chore: spelling Signed-off-by: bkioshn --- wasm/wasi/Earthfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wasm/wasi/Earthfile b/wasm/wasi/Earthfile index 3cfeb78bc..ff7b6ee92 100644 --- a/wasm/wasi/Earthfile +++ b/wasm/wasi/Earthfile @@ -7,7 +7,7 @@ IMPORT github.com/input-output-hk/catalyst-ci/earthly/wasm/c:v3.5.14 AS wasm-c-c # Use when debugging cat-ci locally. # IMPORT ../../catalyst-ci/earthly/rust AS rust-ci -#cspell: words rustfmt wasi autodrop teavm +#cspell: words rustfmt wasi autodrop teavm CFLAGS sysroot # Make am Artifact which consists of the WIT SRC. builder: