Skip to content

Conversation

@avrabe
Copy link
Contributor

@avrabe avrabe commented Jan 9, 2026

Summary

  • Remove incomplete rust_wasm_component_macro rule (never fully implemented, fails for symmetric mode)
  • Remove examples/macro_example/ directory (BUILD.bazel never compiled the lib.rs)
  • Remove examples/oci_publishing/src/ directory (unused - BUILD uses alias to basic example)

Context

Investigation of issue #46 revealed that:

  1. rust_wasm_component_macro was never used by any target
  2. Examples with generate!() macro code were dead code - never actually compiled
  3. rust_wasm_component_bindgen already covers all commonly-used macro options

Verification

  • wit_bindgen rule supports: with_mappings, additional_derives, ownership, async_interfaces, generate_all, format_code
  • options attribute provides escape hatch for edge cases (skip, raw_strings, features)
  • Build verified: bazel build //rust:defs.bzl //examples/oci_publishing:hello_oci_component passes

Remove incomplete/unused macro-based WIT binding approach:

- rust_wasm_component_macro.bzl: Never fully implemented, fails for
  symmetric mode, no targets used this rule
- examples/macro_example/: BUILD.bazel never compiled lib.rs with
  generate!() macro - only had rust_binary for host app
- examples/oci_publishing/src/: Unused since BUILD.bazel uses alias
  to //examples/basic:hello_component

The rust_wasm_component_bindgen rule covers all commonly-used
generate!() macro options (with_mappings, additional_derives,
ownership, async_interfaces, generate_all) with an options escape
hatch for edge cases.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@avrabe avrabe force-pushed the cleanup/remove-dead-macro-code branch from 5522d08 to 3960f0c Compare January 10, 2026 11:18
@avrabe avrabe merged commit d628826 into main Jan 10, 2026
22 checks passed
@avrabe avrabe deleted the cleanup/remove-dead-macro-code branch January 10, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants