-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Description
I just merged #134, which adds a new web handle type based on references to a JsValue
. I opted to merge it now so we can migrate bikeshedding to a new thread.
Three strategies were proposed of having wasm-bindgen
-based handles without using the data attribute ID hack:
- Storing the internal
idx
u32
field that theJsValue
is a wrapper around. While this approach is dependency free and compatible with the current WASM ABI, concerns were voiced that the new API introduced too many footguns, especially for smaller-scale use cases. - Storing the
JsValue
inline. This adds an optional dependency onwasm-bindgen
and makes it so window handles can no longer beCopy
. - Current: Store a pointer that is said to point to a
JsValue
through a reference. This, again, requires an optional dependency onwasm-bindgen
, but makes the handlesCopy
.
Which strategy should we use to store web handles?
Metadata
Metadata
Assignees
Labels
No labels