File tree Expand file tree Collapse file tree 3 files changed +13
-4
lines changed
hermes/apps/athena/modules/http-proxy Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,10 @@ IMPORT ../../../../ AS hermes
4
4
IMPORT ../../../../../wasm/wasi AS wasi
5
5
6
6
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 \
9
11
10
12
11
13
Original file line number Diff line number Diff line change @@ -88,11 +88,18 @@ BUILD_RUST_COMPONENT:
88
88
89
89
ARG wasi_src_dir= ../wasi # where should the /wasi directory reside at compilation
90
90
ARG out= out.wasm # name of the saved artifact
91
+ ARG workspace_dir # workspace directory (needed when having path dependencies)
91
92
92
93
FROM +builder --wasi_src_dir = $wasi_src_dir
93
94
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
96
103
97
104
DO rust-ci+CARGO \
98
105
--args "build --target wasm32-wasip2 --release" \
You can’t perform that action at this time.
0 commit comments