-
Notifications
You must be signed in to change notification settings - Fork 42
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
Wgsl alias
does not work when using from module
#79
Comments
i haven't used aliases at all, so i wouldn't t expect this to work without some changes. that said, this error is due to the '2' on the end. if you call it VecTwo you might get it to work, or at least get another error. we do some translations to allow most items (not struct members, and apparently not aliases) to end in numbers, and probably need to handle aliases explicitly as well in the same way. but i suspect there will be more changes required to support aliases, maybe for internal use in a module and almost certainly for importing them into another module. i'm not sure importing them would ever work, since i'm not sure languages other than wgsl have alias support. |
Ugh, you are right. I renamed error: unknown type: 'Vivek'
┌─ :4:53
│
4 │ @group(0) @binding(1) var<uniform> valid: Vivek;
│ ^^^^^ unknown type
│
= unknown type: 'Vivek' |
I'd mostly like to use then as semi- new types for things like For other languages I suppose, we just output the types they alias? |
do type aliases in wgsl give you type safety? the docs are unclear but i suspect not. and if not i guess you could just include the aliases everywhere you want to use them... |
It doesn't. But its better than nothing. 😄 |
It appears that you can't use wgsl alias from a composable module. It works when using you are using from the make module file though.
Here you get the error:
The text was updated successfully, but these errors were encountered: