@@ -9,6 +9,7 @@ VERSION 0.8
9
9
# This includes: rustc, cargo, wasm32-wasip2 target, optimization tools, and build utilities
10
10
IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust:v3.5.14 AS rust-ci
11
11
12
+
12
13
# Alternative for local catalyst-ci debugging (uncomment when needed):
13
14
# IMPORT ../../../catalyst-ci/earthly/rust AS rust-ci
14
15
@@ -122,10 +123,7 @@ gen-bindings:
122
123
# Output: http_proxy.wasm - Executable WebAssembly module
123
124
# Duration: ~3-5 minutes (Rust compilation to WASM)
124
125
local-build-http-proxy :
125
- # Initialize the Rust CI environment with pre-configured toolchain
126
126
DO rust-ci+SETUP
127
-
128
- # Set working directory for build process
129
127
WORKDIR /app
130
128
131
129
# Copy source code and project configuration
@@ -140,17 +138,35 @@ local-build-http-proxy:
140
138
COPY http-proxy/lib/manifest_module.json .
141
139
COPY http-proxy/lib/metadata.json .
142
140
COPY http-proxy/lib/settings.schema.json .
141
+
142
+ # Create the missing config.json file (empty JSON object)
143
+ RUN echo '{}' > config.json
144
+
145
+ # Download web assets directly to root level
146
+ COPY github.com/input-output-hk/catalyst-voices/catalyst_voices+build-web/web .
143
147
144
148
# Compile Rust code to WebAssembly
145
149
DO rust-ci+CARGO \
146
150
--args "build --target wasm32-wasip2 --release" \
147
151
--output = "wasm32-wasip2/release/http_proxy.wasm"
148
152
149
- # Export build artifacts
150
- SAVE ARTIFACT target/wasm32-wasip2/release/http_proxy.wasm http_proxy.wasm
153
+ # Create staging directory structure
154
+ RUN mkdir -p /staging/www
155
+
156
+ # Copy WASM module and JSON config files to root of staging
157
+ RUN cp target/wasm32-wasip2/release/http_proxy.wasm /staging/
158
+ RUN cp *.json /staging/ || true
159
+
160
+ # Copy web assets to www subdirectory
161
+ RUN cp -r assets /staging/www/ || true
162
+ RUN cp -r canvaskit /staging/www/ || true
163
+ RUN cp -r icons /staging/www/ || true
164
+
165
+ # Copy all regular files from current directory to staging/www, skip directories
166
+ RUN find . -maxdepth 1 -type f -exec cp {} /staging/www/ \; 2> /dev/null || echo "⚠️ Some files may not have been copied"
151
167
152
- # Save to local filesystem in expected location for packaging
153
- SAVE ARTIFACT target/wasm32-wasip2/release/http_proxy.wasm AS LOCAL http-proxy/lib/http_proxy.wasm
168
+ # Export build artifacts from staging directory
169
+ SAVE ARTIFACT /staging AS LOCAL http-proxy/lib
154
170
155
171
# Future Module Build Targets
156
172
# ============================
0 commit comments