WESL enriches the WGSL shader language with extensions like
import
,@if
.
wesl-js has tools and libraries for JavaScript / TypeScript projects to use WESL.
Using WESL with a bundler plugin is the recommended experience.
npm install wesl
npm install -D wesl-plugin
To use WESL as a library, use the link
API.
Get started with vanilla WESL.
npm install wesl
Do you only want to link a few .wgsl files together, and do not need libraries?
Want to publish your WESL library?
See also wesl-rs for using WESL in Rust/C++ projects. wesl-rs and wesl-js are interoperable implementations of the same WESL specification.
See Developing for working on wesl-js itself
Except where noted (below and/or in individual files), all code in this repository is dual-licensed under either:
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.