Skip to content

Commit 5b57481

Browse files
committed
fix: resolve WAC composition syntax and enhance multi-file packaging examples
This commit addresses several important fixes and improvements: ## WAC Composition Fix - Correct WAC composition syntax in integration tests from `storage: service-a` to `storage: service-a.storage` for proper interface member access - Add ellipsis syntax (`...`) to auto-wire remaining WASI imports - Resolves issue #20 where WAC composition was failing due to incorrect interface resolution syntax ## Multi-File Packaging Enhancements - Expand multi-file packaging examples with comprehensive demonstrations - Add simple test components for embedded, layered, and bundled approaches - Implement proper file grouping and asset management with Bazel Skylib - Use write_file rules for cross-platform compatibility instead of shell commands - Add extensive documentation files (README, API docs, deployment guide) - Improve genrule syntax to use tar transform for directory structure ## Rust Component Infrastructure - Enhance rust_wasm_component_bindgen to expose native-guest bindings publicly - Fix component rule implementation for better provider forwarding - Improve documentation and code organization ## Documentation Updates - Fix docs-site BUILD dependencies and structure - Add comprehensive examples for different packaging strategies - Provide clear guidance on component deployment and usage These changes ensure WAC composition works correctly with the forked interface resolution fixes and provide production-ready examples for multi-file component packaging across different deployment strategies.
1 parent 8777a86 commit 5b57481

File tree

7 files changed

+346
-245
lines changed

7 files changed

+346
-245
lines changed

docs-site/BUILD.bazel

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ This BUILD file demonstrates the same hermetic approach used for JavaScript comp
77
"""
88

99
load("@bazel_skylib//rules:build_test.bzl", "build_test")
10+
load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
1011
load(":docs_build.bzl", "docs_build")
1112

1213
package(default_visibility = ["//visibility:public"])
@@ -205,19 +206,11 @@ test_suite(
205206
],
206207
)
207208

208-
# Production deployment bundle with full Astro site
209-
genrule(
209+
# Production deployment bundle with full Astro site - using Bazel Skylib copy_file for cross-platform compatibility
210+
copy_file(
210211
name = "deployment_bundle",
211-
srcs = [
212-
":docs_site",
213-
":docs_validation",
214-
],
215-
outs = ["docs_deployment.tar.gz"],
216-
cmd = """
217-
# The docs_site is already a tar.gz archive, so just copy it
218-
cp $(location :docs_site) $@
219-
""",
220-
message = "Creating production documentation deployment bundle",
212+
src = ":docs_site",
213+
out = "docs_deployment.tar.gz",
221214
)
222215

223216
# Fallback deployment (for testing without full toolchain)
@@ -229,9 +222,8 @@ genrule(
229222
],
230223
outs = ["docs_fallback.tar.gz"],
231224
cmd = """
232-
mkdir -p fallback_dist
233-
cp $(location :placeholder_fallback) fallback_dist/index.html
234-
tar -czf $@ fallback_dist/
225+
# Create tar directly with transform to add directory prefix
226+
tar -czf $@ --transform 's|^|fallback_dist/|' --transform 's|.*placeholder_fallback|fallback_dist/index.html|' $(location :placeholder_fallback)
235227
""",
236228
message = "Creating fallback documentation deployment",
237229
)

0 commit comments

Comments
 (0)