Repository navigation
[RFC] feat: Generate requires directives - #3207
Draft
aleksanderkatan wants to merge 1 commit into
Draft
aleksanderkatan wants to merge 1 commit into
aleksanderkatan wants to merge 1 commit into
Conversation
|
pkg.pr.new packages benchmark commit |
Resolution Time Benchmark---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Random Branching (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [1.07, 2.14, 4.93, 7.43, 8.59, 13.58, 29.13, 29.23]
line [0.99, 2.01, 4.49, 7.45, 8.17, 12.86, 26.95, 27.45]
line [1.03, 2.06, 4.31, 7.26, 8.59, 12.25, 27.13, 28.39]
---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Linear Recursion (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.37, 0.60, 0.73, 0.82, 1.17, 1.23, 1.51, 1.62]
line [0.37, 0.59, 0.77, 0.84, 1.12, 1.23, 1.41, 1.60]
line [0.30, 0.57, 0.78, 0.92, 1.28, 1.29, 1.56, 1.78]
---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Full Tree (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [1.01, 2.51, 4.37, 8.19, 15.76, 29.99, 62.83, 128.31]
line [0.82, 2.26, 4.45, 7.75, 13.60, 28.43, 59.27, 119.72]
line [0.88, 2.26, 4.30, 8.11, 14.53, 27.57, 59.39, 122.71]
|
Bundle size comparison (
|
| 🟢 Decreased | ➖ Unchanged | 🔴 Increased (max 0.20%) | ❔ Unknown |
|---|---|---|---|
| 0 | 349 | 6 | 0 |
No notable changes.
If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu.
aleksanderkatan
force-pushed
the
feat/requires
branch
3 times, most recently
from
October 19, 2026 09:16
d953332 to
e3086a1
Compare
aleksanderkatan
force-pushed
the
feat/requires
branch
2 times, most recently
from
October 29, 2026 15:18
1a7db81 to
8e3ddfc
Compare
Co-Authored-By: Claude Opus 5.5 <[email protected]>
aleksanderkatan
force-pushed
the
feat/requires
branch
from
October 29, 2026 15:35
8e3ddfc to
fb53354
Compare
This branch has not been deployed
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.
See https://www.w3.org/TR/WGSL/#language-extensions-sec
Requires directive must be located before any declarations in the WGSL code.
This breaks when concatenating multiple resolves, even with a namespace enabled.
A possible solution:
Or we can just don't generate the 'requires' directive at all, it is not necessary.
Or we could check the navigator (if available), and warn if features are unavailable on the resolving host instead of emitting 'requires'.