Skip to content

Commit 40b0331

Browse files
committed
earthly upd
1 parent 3bab213 commit 40b0331

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

hermes/apps/athena/modules/http-proxy/Earthfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ IMPORT ../../../../ AS hermes
44
IMPORT ../../../../../wasm/wasi AS wasi
55

66
build-http-proxy:
7-
# TODO(no30bit): copy shared from workspace
8-
DO wasi+BUILD_RUST_COMPONENT --wasi-src-dir=../../../../../wasm/wasi --out=http_proxy.wasm
7+
DO wasi+BUILD_RUST_COMPONENT \
8+
--workspace-dir=../../../athena \
9+
--wasi-src-dir=../../../../../wasm/wasi \
10+
--out=http_proxy.wasm \
911

1012

1113

hermes/apps/athena/modules/http-proxy/blueprint.cue

Whitespace-only changes.

wasm/wasi/Earthfile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,18 @@ BUILD_RUST_COMPONENT:
8888

8989
ARG wasi_src_dir=../wasi # where should the /wasi directory reside at compilation
9090
ARG out=out.wasm # name of the saved artifact
91+
ARG workspace_dir # workspace directory (needed when having path dependencies)
9192

9293
FROM +builder --wasi_src_dir=$wasi_src_dir
9394

94-
COPY --keep-ts --dir src .
95-
COPY Cargo.toml .
95+
IF [ -n "$workspace_dir" ]
96+
# copying entire workspace directory
97+
COPY --keep-ts --dir $workspace_dir ./$workspace_dir
98+
ELSE
99+
# copying single crate source
100+
COPY --keep-ts --dir src .
101+
COPY Cargo.toml .
102+
END
96103

97104
DO rust-ci+CARGO \
98105
--args "build --target wasm32-wasip2 --release" \

0 commit comments

Comments
 (0)