Closed MOZGIII closed 4 days ago
https://github.com/rustwasm/wasm-bindgen/pull/3919 has been merged, we can finally proceed
Now this is blocked by wasm-bindgen release: https://github.com/rustwasm/wasm-bindgen/pull/3993#issuecomment-2254654479
Finally this is fully unblocked!
This is a replacement for the
web-sys
crate (and https://github.com/MOZGIII/xwt/pull/117), hard-written instead of being code-generated to overcome the current shortcomings of thewasm_bindgen_webidl
codegen and its choices. See more on that: https://github.com/rustwasm/wasm-bindgen/issues/3921The rationale for the hard-written bindings are greater for the development experience, since you get the code that doesn't have
JsValue
s as return types - but a much saner types without a need for manual conversion (this is actually something that we had bugs with before), but also performance gains, since we can addfinal
clause to thewasm_bindgen
macro invocation for more efficient bindings at the hot I/O paths.The hand crafted bindings turned out to be much more comprehensive and useful than the generated ones - because the generated bindings just lack some huge parts of the API surface, and other part of the API are simply generated wrong and/or unusable due to invalid assumptions of the code generator. Needless to say, the generated code is just not ergonomic without a real reason for it - must be a shortcoming of the generator, and most likely fixable - see https://github.com/rustwasm/wasm-bindgen/issues/3921.
To do: