Skip to content

refactor(types): prototype inner-wrapper macro#51

Merged
darioAnongba merged 2 commits intomainfrom
refactor/wrapper-boilerplate-macro
May 7, 2026
Merged

refactor(types): prototype inner-wrapper macro#51
darioAnongba merged 2 commits intomainfrom
refactor/wrapper-boilerplate-macro

Conversation

@darioAnongba
Copy link
Copy Markdown
Collaborator

@darioAnongba darioAnongba commented Apr 22, 2026

Summary

  • add a small declarative impl_inner_wrapper! macro for tuple wrappers that only need Deref plus From conversions
  • refactor the low-risk wrapper types that matched that exact pattern
  • keep wasm_bindgen methods and getters explicit so the generated JS and TS surface stays easy to read

Why this slice

Issue #25 is broad, so this PR intentionally takes the smallest safe slice first. It targets the truly repetitive structural boilerplate and leaves field-forwarding methods explicit.

I did not introduce a proc macro here because that would add substantially more maintenance complexity for a small amount of repetition.

Refs #25

@darioAnongba darioAnongba self-assigned this May 7, 2026
@darioAnongba darioAnongba marked this pull request as ready for review May 7, 2026 11:50
@darioAnongba darioAnongba merged commit 5782a56 into main May 7, 2026
12 checks passed
@darioAnongba darioAnongba deleted the refactor/wrapper-boilerplate-macro branch May 7, 2026 11:51
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.

1 participant