No description
  • Rust 95.2%
  • TypeScript 4.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
aviac 046c8b3d1e
Some checks failed
Update Actions Caches / env (push) Has been cancelled
Update Actions Caches / Build Caches (push) Has been cancelled
Update Actions Caches / Build Caches-1 (push) Has been cancelled
Update Actions Caches / Build Caches-2 (push) Has been cancelled
Coverage / coverage (push) Has been cancelled
Security Static Analysis / CodeQL Analyze (actions) (push) Has been cancelled
Security Static Analysis / CodeQL Analyze (javascript-typescript) (push) Has been cancelled
Security Static Analysis / CodeQL Analyze (rust) (push) Has been cancelled
Security Static Analysis / zizmor (push) Has been cancelled
run taplo fmt
2026-08-17 14:45:43 +02:00
.cargo Update workflows and xtask (#360) 2025-07-06 06:07:56 +00:00
.github Update formatting (#1386) 2026-08-14 15:11:55 +00:00
.vscode Replace npm with safer pnpm (#942) 2026-03-26 12:00:38 +01:00
crates run taplo fmt 2026-08-17 14:45:43 +02:00
docs/book Tint diagnostics (#1201) 2026-07-26 20:45:38 +00:00
editors/code internal: bump typescript from 6.0.3 to 7.0.2 in /editors/code (#1310) 2026-08-16 10:15:33 +00:00
xtask run taplo fmt 2026-08-17 14:45:43 +02:00
.editorconfig TS code cleanup (#1240) 2026-06-26 11:21:14 +00:00
.gitattributes Update workflows and xtask (#360) 2025-07-06 06:07:56 +00:00
.gitignore Add initial WESL support (#330) 2025-06-28 12:58:14 +00:00
.markdownlint-cli2.jsonc fix: Add support for client config (settings.json) and config documentation generation (#549) 2025-11-04 08:23:46 +00:00
.markdownlint.jsonc Port test fixture and simplify file handling (#890) 2026-03-08 00:38:26 +00:00
Cargo.lock Fix unused lints (#1391) 2026-08-15 10:10:50 +00:00
Cargo.toml run taplo fmt 2026-08-17 14:45:43 +02:00
clippy.toml run taplo fmt 2026-08-17 14:45:43 +02:00
CODE_OF_CONDUCT.md Add Code of conduct (#392) 2025-07-09 16:21:19 +00:00
CONTRIBUTING.md Add Contributing.md (#391) 2025-07-08 20:50:29 +00:00
deny.toml run taplo fmt 2026-08-17 14:45:43 +02:00
flake.lock run taplo fmt 2026-08-17 14:45:43 +02:00
flake.nix run taplo fmt 2026-08-17 14:45:43 +02:00
LICENSE-APACHE Code dump 2021-11-20 17:45:26 +01:00
LICENSE-MIT Switch to DavidAnson/markdownlint-cli2-action (#327) 2025-06-25 21:42:11 +00:00
LICENSE.md Switch to DavidAnson/markdownlint-cli2-action (#327) 2025-06-25 21:42:11 +00:00
logo.svg New logo (#393) 2025-07-09 00:47:07 +02:00
package.json Update npm packages (#1102) 2026-04-29 09:31:54 +00:00
pnpm-workspace.yaml fix corepack usage (#1199) 2026-06-11 12:29:10 +00:00
README.md Update README.md (#962) 2026-04-16 20:50:38 +00:00
RELEASES.md Fix CI (#158) 2025-02-07 02:31:27 +01:00
rustfmt.toml migrate from lsp-types to gen-lsp-types (#1090) 2026-04-26 11:54:03 +00:00
SECURITY.md Create SECURITY.md 2025-03-29 18:15:14 +01:00
tombi.toml Update formatting (#1386) 2026-08-14 15:11:55 +00:00
typos.toml run taplo fmt 2026-08-17 14:45:43 +02:00
zizmor.yaml Changelog xtask command (#1036) 2026-04-18 22:43:51 +00:00

wgsl-analyzer

wgsl-analyzer logo

Discord

codecov

wgsl-analyzer is a language server plugin for the WebGPU Shading language (WGSL). It also supports WGSL Extended Shader Language (WESL). Note: (support for WESL is experimental and in-progress)

You can use it with any editor that supports the Language Server Protocol (for example, VS Code, Vim, Emacs, Zed).

wgsl-analyzer's features include go-to-definition, type checking, code completion, and much more is planned. wgsl-analyzer also supports integrated diagnostics (with naga).

Internally, wgsl-analyzer is structured as a set of libraries for analyzing Rust code. See Architecture in the manual.

It comes with a VS Code extension located in ./editors/code. Due to the nature of the language server protocol, it should be possible to create plugins for other editors as well.

Quick Start

See the installation guide in the manual.

Building from source

The easiest way to build the language server and extension and install it all in one command:

cargo xtask install

The following instructions describe the manual steps:

The LSP server can be built using cargo build --release -p wgsl-analyzer.

The VS Code extension can either be built as a platform-specific extension which bundles the language server binary, or as a platform-independent one.

1. Install node modules:

pnpm --dir editors/code install

2. Package extension: (choose one)

Platform independent extension:

pnpm --dir editors/code run package

Platform-specific extension:

Copy the server binary (either wgsl-analyzer or wgsl-analyzer.exe) into ./editors/code/server/:

mkdir editors/code/server
cp target/release/wgsl-analyzer editors/code/server/wgsl-analyzer

Next, run:

pnpm --dir editors/code run package --target <target> -o wgsl-analyzer-<target>.vsix

Example: pnpm --dir editors/code run package --target linux-x64 -o wgsl-analyzer-linux-x64.vsix

where the target is one of the targets listed as platform-specific extension targets.

The output is a file such as editors/code/wgsl-analyzer-linux-x64.vsix

3. Install the extension:

Open the VSIX with VS Code, for example, by running the VS Code command (F1):

> Extensions: Install from VSIX...