Repository navigation
Conversation
saecki
force-pushed
the
feature-gated-bindings
branch
2 times, most recently
from
June 3, 2026 15:03
2cbe89c to
a50eb4f
Compare
saecki
force-pushed
the
feature-gated-bindings
branch
4 times, most recently
from
June 10, 2026 18:10
de31d7c to
f71c785
Compare
saecki
force-pushed
the
feature-gated-bindings
branch
from
June 12, 2026 12:08
f71c785 to
f238dba
Compare
14 tasks done
saecki
force-pushed
the
feature-gated-bindings
branch
2 times, most recently
from
June 19, 2026 12:51
c9fbc15 to
5b2ef2d
Compare
Contributor
It seems there is no dedicated issue for this yet (at least I did not find one), and I just encountered that error and was a bit confused at first. Would it be useful if I created a dedicated issue for requesting such nicer error messages for this situation? |
Member
Author
|
We definitely want to merge a version of this PR. We're just cautious regarding any performance regressions but optimizing the binding accesses shouldn't be a big issue. |
saecki
force-pushed
the
feature-gated-bindings
branch
3 times, most recently
from
June 25, 2026 16:13
10623db to
440528d
Compare
saecki
changed the base branch from
pretty-nested-svg
to
foreign-capability-impls
June 25, 2026 16:14
saecki
force-pushed
the
foreign-capability-impls
branch
from
June 30, 2026 10:50
07d0c96 to
3caad47
Compare
This defers providing enabled library features until accessing a binding. It also allows generating a nicer error message for feature gated bindings, instead of just saying it is undefined.
…ize `Binding::read_checked`
saecki
force-pushed
the
feature-gated-bindings
branch
from
June 30, 2026 10:53
440528d to
c4a1149
Compare
saecki
force-pushed
the
foreign-capability-impls
branch
2 times, most recently
from
June 30, 2026 15:16
5e5422f to
4f11ef5
Compare
This file contains hidden or 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
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.
Based on #8571
This defers providing enabled library features until accessing a binding.
It also allows generating a nicer error message for feature gated bindings, instead of just saying it is undefined.
Here's an example of an error message before:
and here the same one after:
We still have to check that this doesn't hurt performance, since
read_checkedis a somewhat hot function.There are currently no tests implemented, because that would require changing the
TestWorldfeatures, which is a bit of a pain and I first want to check for performance regressions.