-
Notifications
You must be signed in to change notification settings - Fork 3
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
Edition declaration #5
Comments
I agree that we should require the edition to be specified. When we have a second edition, we'll want to be able to link with libraries written in the first edition. It'd be nice to have forward compatibility in the syntax between editions, but that seems hard to guarantee - the underlying wgsl language may change expectations for future wesl editions. Extending Including a year sounds helpful in the name, Before we've declared a first edition stable, I'd suggest we allow but not require e.g. For library .wesl, I guess we could require a well known file e.g. For application .wesl, requiring that the I'd suggest we require all application wesl to be the same edition. And each package should internally have a consistent wesl edition. To support a library ecosystem, we should happily link if the app, package1, and package2 all have different editions. I imagine we'll aim to make (In the future, when there are multiple wesl editions available, we could conceivably allow mixing multiple editions within the application package. But seems unlikely we'll need that.) I'm guessing we'll be tempted to allow importing from raw wgsl files as well, at least in the application if not in libraries. I'm assuming wgsl can be distinguished from wesl by file name suffix metadata for now. |
Should we make the enable clause required or optional for the first wesl edition? Required is nice because:
Optional is nice because:
|
Required! Rust made it optional, and it led to accidents a few times. I'm not entirely sure if the latest versions of the Rust compiler will even go so far as to warning you when you leave it out. |
Before we get to the first stable edition, I imagine we'll have a long period where we're trying WESL in apps and packages with early adopters. We can ask the early adopters to do a bit more work, e.g. expect that they'll want to make sure their tools, apps, and packages are all on the same What WESL version names should we use during that pre-stable period? Should we just number them sequentially? Should we inject into the WESL some version information about the tools used? e.g. |
Should we require a statement like
enable wgsly.2024
in the main file? As inWe can use the existing WGSL keyword for this https://www.w3.org/TR/WGSL/#extensions
We can either define it in the code, or in the wgsl.toml.
The text was updated successfully, but these errors were encountered: