You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: update rule documentation and schema generation
Update rule documentation and schema generation tools to reflect
recent improvements to Rust component binding generation:
**Documentation Updates:**
- Refresh rules.mdx with current rust_wasm_component_bindgen capabilities
- Update rule descriptions to reflect enhanced binding generation
- Document improved WAC composition support and multi-file packaging
**Schema Generation Improvements:**
- Enhance comprehensive_schemas.go to capture latest rule attributes
- Update schema generation to reflect binding generation improvements
- Ensure documentation accurately represents current rule capabilities
These documentation updates ensure that users have accurate information
about the current state of rules_wasm_component functionality, particularly
the recent fixes to WAC composition and Rust binding generation.
Copy file name to clipboardExpand all lines: docs-site/src/content/docs/reference/rules.mdx
-28Lines changed: 0 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -227,13 +227,6 @@ rust_wasm_component(
227
227
228
228
Builds a Rust WebAssembly component with WIT binding generation. Compiles Rust source code into a WASM component and generates language bindings from WIT interfaces.
229
229
230
-
**Generated Targets:**
231
-
-`{name}_bindings_host`: Native platform rust_library for native applications (e.g., test runners, benchmarks)
232
-
-`{name}_bindings`: Guest component rust_library for WebAssembly components
233
-
-`{name}`: The final guest component
234
-
235
-
> **📖 Deep Dive:** For detailed guidance on when to use native vs guest bindings, see [Native vs Guest Bindings Guide](/guides/host-vs-wasm-bindings/).
Description: "Tests a Go WebAssembly component built with TinyGo. Performs comprehensive validation including component format verification, TinyGo-specific pattern checks, and WASI Preview 2 compatibility testing.",
185
+
LoadFrom: "@rules_wasm_component//go:defs.bzl",
186
+
Attributes: map[string]Attribute{
187
+
"name": {"string", true, nil, "A unique name for this target", nil},
188
+
"component": {"label", true, nil, "Go WASM component to test", nil},
189
+
},
190
+
Examples: []Example{
191
+
{"Component testing", "Test a TinyGo WebAssembly component", `go_wasm_component_test(
192
+
name = "calculator_component_test",
193
+
component = ":calculator_component",
178
194
)`},
179
195
},
180
196
},
@@ -388,6 +404,47 @@ go_wasm_component(
388
404
)`},
389
405
},
390
406
},
407
+
"wac_bundle": {
408
+
Name: "wac_bundle",
409
+
Type: "rule",
410
+
Description: "Bundle WASM components without composition, suitable for WASI components. Collects multiple components into a single bundle directory without creating a composed component.",
411
+
LoadFrom: "@rules_wasm_component//wac:defs.bzl",
412
+
Attributes: map[string]Attribute{
413
+
"name": {"string", true, nil, "A unique name for this target", nil},
414
+
"components": {"label_keyed_string_dict", true, nil, "Map of component targets to their names in the bundle", nil},
Description: "Plug component exports into component imports using WAC. Automatically connects component exports to imports through WAC's plug functionality.",
431
+
LoadFrom: "@rules_wasm_component//wac:defs.bzl",
432
+
Attributes: map[string]Attribute{
433
+
"name": {"string", true, nil, "A unique name for this target", nil},
434
+
"socket": {"label", true, nil, "The socket component that imports functions", nil},
435
+
"plugs": {"label_list", true, nil, "The plug components that export functions", nil},
436
+
},
437
+
Examples: []Example{
438
+
{"Component plugging", "Connect exports to imports automatically", `wac_plug(
0 commit comments