Skip to content

Conversation

@RunDevelopment
Copy link
Contributor

This fixes the issue we talked about here. Basically, in #4147 I changed the bindings of string enums to use a variable storing an array (point 3). However, this array was always generated regardless of whether it was actually used or not.

This PR fixes the issue by marking which enums are used as the bindings are generated. Since we always generate the bindings of function that can use string enums before the variable of a string enum, this works out. I used the same expose_* pattern for the function that is commonly used for this type of task.

Copy link
Member

@daxpedda daxpedda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, this is great!

@daxpedda daxpedda merged commit 5e98a17 into wasm-bindgen:main Oct 13, 2024
41 checks passed
@RunDevelopment RunDevelopment deleted the rm-unused-string-enum-arrays branch October 13, 2024 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants