You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not 100% sure whether this is a bug or a feature request, but, in theory, wasm-bindgen ABI can be seen as any other, and so repr(...) should have an effect.
Steps to Reproduce
Define a struct with a single field (or a single field and a zero-size type like PhantomData).
Add #[repr(transparent)] to signify that its ABI should be the same as the inner field.
Add #[wasm_bindgen] attribute to export struct to JS.
Expected Behavior
Struct is represented on the JS side as a type alias to the inner field.
Actual Behavior
A wrapper class is generated.
The text was updated successfully, but these errors were encountered:
Describe the Bug
I'm not 100% sure whether this is a bug or a feature request, but, in theory, wasm-bindgen ABI can be seen as any other, and so
repr(...)
should have an effect.Steps to Reproduce
PhantomData
).#[repr(transparent)]
to signify that its ABI should be the same as the inner field.#[wasm_bindgen]
attribute to export struct to JS.Expected Behavior
Struct is represented on the JS side as a type alias to the inner field.
Actual Behavior
A wrapper class is generated.
The text was updated successfully, but these errors were encountered: