Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate web-sys types for corresponding typescript types #1

Closed
abrgr opened this issue Feb 8, 2022 · 1 comment
Closed

Generate web-sys types for corresponding typescript types #1

abrgr opened this issue Feb 8, 2022 · 1 comment
Assignees

Comments

@abrgr
Copy link
Member

abrgr commented Feb 8, 2022

web-sys is generated from webidl and has a crate feature for each generated type. To keep in sync with web-sys, we can either:

  • Generate our types from webidl
  • Generate our types from the crate features
  • Generate our types from the generated web-sys code

Generating from crate features using cargo-whatfeatures at compile time seems reasonable given that web-sys plans to use a feature per class.

One issue: we will need to match their name mangling.

@abrgr abrgr self-assigned this Feb 8, 2022
@abrgr
Copy link
Member Author

abrgr commented Feb 8, 2022

Fixed via:

  • c59906f - introduce ts-bindgen-build-support
  • 584ca33 - implement web-sys feature collection
  • c2ea4b2 - implement web-sys handling

@abrgr abrgr closed this as completed Feb 8, 2022
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

No branches or pull requests

1 participant