Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

wgsl-analyzer Binary

Text editors require the wgsl-analyzer binary to be in $PATH. You can download pre-built binaries from the releases page. You will need to uncompress and rename the binary for your platform.

For example, on Mac OS:

  1. extract wgsl-analyzer-aarch64-apple-darwin.gz to wgsl-analyzer
  2. make it executable
  3. move it into a directory in your $PATH

On Linux, to install the wgsl-analyzer binary into ~/.local/bin, these commands should work:

mkdir -p ~/.local/bin
curl -L https://github.com/wgsl-analyzer/wgsl-analyzer/releases/latest/download/wgsl-analyzer-x86_64-unknown-linux-gnu.gz | gunzip -c - > ~/.local/bin/wgsl-analyzer
chmod +x ~/.local/bin/wgsl-analyzer

Make sure that ~/.local/bin is listed in the $PATH variable and use the appropriate URL if you are not on a x86-64 system.

You do not have to use ~/.local/bin, any other path like ~/.cargo/bin or /usr/local/bin will work just as well.

Alternatively, you can install it from source using the command below. You will need the latest stable version of the Rust toolchain.

git clone https://github.com/wgsl-analyzer/wgsl-analyzer.git && cd wgsl-analyzer
cargo xtask install --server

If your editor cannot find the binary even though the binary is on your $PATH, the likely explanation is that it does not see the same $PATH as the shell. On Unix, running the editor from a shell or changing the .desktop file to set the environment should help.

Arch Linux

The wgsl-analyzer binary can be installed from the repos or AUR (Arch User Repository):

Install it with pacman, for example:

pacman -S wgsl-analyzer

Gentoo Linux

macOS

The wgsl-analyzer binary can be installed via Homebrew.

brew install wgsl-analyzer

Windows

The wgsl-analyzer binary can be installed via WinGet or Chocolatey.

winget install wgsl-analyzer
choco install wgsl-analyzer