4 releases
0.4.2 | Jan 2, 2025 |
---|---|
0.4.1 | Dec 20, 2024 |
0.4.0 | Nov 23, 2024 |
0.3.1 | Oct 2, 2024 |
#502 in Development tools
256 downloads per month
230KB
5.5K
SLoC
Shader language server
This application is a language server for shaders (HLSL, GLSL, WGSL) that is mainly meant to be used as a server for vscode extension shader-validator. It is following the LSP protocol to communicate with the extension so it could be used with any editor supporting it. It can be built to desktop or WASI. WASI will let the extension run even in web version of vscode, but it suffer from limitations. See below for more informations.
Features
This language server support a few options :
- Diagnostics: lint the code as you type.
- Completion: suggest completion values as you type.
- Signature: view the signatures of the current function.
- Hover: view the declaration of an element by hovering it.
- Goto: allow to go to declaration of an element.
The server support HLSL, GLSL, WGSL diagnostics, but symbol requests are not implemented for WGSL yet.
Diagnostics
Diagnostics are generated following language specifics API:
- GLSL uses glslang-rs as backend. It provide complete linting for GLSL trough glslang API bindings from C.
- HLSL uses hassle-rs as backend. It provides bindings to directx shader compiler in rust.
- WGSL uses naga as backend for linting.
Symbols
Symbols are retrieved using queries based on tree-sitter API.
Dependencies
~55MB
~1M SLoC