-
Notifications
You must be signed in to change notification settings - Fork 4
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
Hand-crafted WebTransport Web API bindings #129
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MOZGIII
force-pushed
the
web-high-level-crate
branch
from
April 11, 2024 15:25
b36125e
to
b2f911f
Compare
MOZGIII
changed the title
Dedicated Web API crate
Hand-crafted WebTransport Web API bindings
Apr 12, 2024
MOZGIII
force-pushed
the
web-high-level-crate
branch
5 times, most recently
from
April 12, 2024 23:45
2154a5e
to
892748e
Compare
MOZGIII
force-pushed
the
web-high-level-crate
branch
from
April 22, 2024 06:10
892748e
to
0234d14
Compare
rustwasm/wasm-bindgen#3919 has been merged, we can finally proceed |
Now this is blocked by wasm-bindgen release: rustwasm/wasm-bindgen#3993 (comment) |
MOZGIII
force-pushed
the
web-high-level-crate
branch
from
August 17, 2024 07:23
8ff0003
to
2314eb0
Compare
Finally this is fully unblocked! |
MOZGIII
force-pushed
the
web-high-level-crate
branch
from
August 18, 2024 03:52
2314eb0
to
ed51465
Compare
MOZGIII
force-pushed
the
web-high-level-crate
branch
from
September 13, 2024 20:29
ed51465
to
3bf5a3b
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a replacement for the
web-sys
crate (and #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: rustwasm/wasm-bindgen#3921
The 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 rustwasm/wasm-bindgen#3921.
To do:
adjust the crates namingwill do this after we ship a release; so in another PR