wesl code will coexist in the community with vanilla wgsl code for the foreseeable future. To enable easy interop with wgsl, I'd suggest we allow wesl imports to import from vanilla wgsl modules.
A user should be able to take a wgsl file containing a utility functions (e.g. color space conversion), add the wgsl file into their project and immediately be able to import one or more of the utility functions into their wesl application with no editing of the wgsl required. Another scenario, users with existing wgsl projects would be able to incrementally move their wgsl files to wesl with higher confidence since no editing is strictly required.
It would be nice if a wgsl code module is valid wesl, in which case supporting this feature requires no additional implementation effort. But several features we've discussed (e.g. module private by default, required module paths, etc.) would break that assumption.
If wgsl is not valid wesl, we could still teach linkers, language servers, and other tools to understand wgsl as well as wesl. Some additional complexity would ensue of course.
wesl code will coexist in the community with vanilla wgsl code for the foreseeable future. To enable easy interop with wgsl, I'd suggest we allow wesl imports to import from vanilla wgsl modules.
A user should be able to take a wgsl file containing a utility functions (e.g. color space conversion), add the wgsl file into their project and immediately be able to import one or more of the utility functions into their wesl application with no editing of the wgsl required. Another scenario, users with existing wgsl projects would be able to incrementally move their wgsl files to wesl with higher confidence since no editing is strictly required.
It would be nice if a wgsl code module is valid wesl, in which case supporting this feature requires no additional implementation effort. But several features we've discussed (e.g. module private by default, required module paths, etc.) would break that assumption.
If wgsl is not valid wesl, we could still teach linkers, language servers, and other tools to understand wgsl as well as wesl. Some additional complexity would ensue of course.