-
Notifications
You must be signed in to change notification settings - Fork 2
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
support for wgsl syntax extensions? #3
Comments
Sure, if there’s enough demand. However, just my 2 cents to make extensions easier for tooling to handle: if possible, extensions should not introduce additional syntax, and instead opt for using attributes. Unknown attributes are easier to parse, and can easily be ignored. For example, export/import can use |
That is an interesting suggestion. We have discussed using attributes in the past for other usecases than imports such as conditional compilation @if or a rusty @cfg that can be placed on function, structs, struct members, maybe statements, ... But we didn't discuss it for imports. Attributes have to decorate something, so what would imports decorate? The function using the imports? Or do we allow attributes that decorate nothing at the top of the file? To me It makes a lot of sense for @export. --->> if you want to be part of the discussion we'd love to have you on board on our fresh discord! https://discord.gg/5UhkaSu4dt |
For @import
override name_of_file_or_module; |
There's now a growing body of docs here, and at least a couple of new linker protoypes in progress. If you've time, bring your thoughts over to a github or discord to help make sure we're going in the right direction for language servers. For example, do you think it would be feasible to share a wgsl parser between a linker and a language server? |
I found out that there's also missing support for many wgpu extensions/features. |
Would you be game to support an extended wgsl syntax in glasgow?
We've been working towards defining some community standard syntax extensions for wgsl for rust and typescript linkers like wgsl-linker. Documentation on the extensions coming soon, the first feature out of the gate will be keywords for import / export..
The text was updated successfully, but these errors were encountered: