Skip to content

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

Draft
darioAnongba wants to merge 1 commit intomainfrom
refactor/wrapper-boilerplate-macro
Draft

refactor(types): prototype inner-wrapper macro#51
darioAnongba wants to merge 1 commit intomainfrom
refactor/wrapper-boilerplate-macro

Conversation

@darioAnongba
Copy link
Copy Markdown
Collaborator

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

Validation

  • cargo fmt --check
  • cargo clippy --all-features --all-targets -- -D warnings
  • cargo test --all-features
  • cd tests/node && corepack yarn lint
  • cd tests/node && corepack yarn build (blocked in this environment because clang is not installed for the wasm32-unknown-unknown build path)

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