Re: [webgpu] Add the `import` keyword or some equivalent

This was discussed at https://github.com/gpuweb/gpuweb/issues/741, and
https://github.com/gpuweb/gpuweb/issues/568.

Personally, I think it could be done better as third-party code using
string manipulation, rather than via shader module dependency tracking
within the api. External tools can be implemented easily enough to provide
that functionality. Some have already been developed.

On Fri, Jan 17, 2025 at 1:13 AM Rowan Fraser <beanfun1@gmail.com> wrote:

> Hello W3 Consortium,
> I want to work with WGSL and WebGPU but the inability to have any kind of
> import or library or modulation mechanism is crippling to any real-world
> development in the language. It isn't possible currently to have reasonably
> sized scriptis, instead I'm forced to jump around to different commented
> sections. I would like to use WGPU as a universal shading language but as
> it stands the inconvenience of that (along with other tooling issues) makes
> it an unsuitable replacement for tools such as Vulkan and SPIR-V. I think
> that one key functionality would do a great deal to open up development as
> it would allow passing around of functional libraries while also preventing
> WGSL scripts from becoming too bloated.
> Thank you for your time,
> From Rowan Fraser
>

Received on Friday, 17 January 2025 16:39:11 UTC