https://github.com/dannymcgee/vscode-wgsl
Rich language support for WebGPU Shading Language
https://github.com/dannymcgee/vscode-wgsl
Last synced: 6 months ago
JSON representation
Rich language support for WebGPU Shading Language
- Host: GitHub
- URL: https://github.com/dannymcgee/vscode-wgsl
- Owner: dannymcgee
- License: apache-2.0
- Created: 2021-07-11T10:31:41.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-05-20T21:44:31.000Z (12 months ago)
- Last Synced: 2024-05-20T23:11:13.442Z (12 months ago)
- Language: Rust
- Size: 1.99 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# WGSL Language Server and VS Code Extension
This project aims to provide rich editor support for
[WebGPU shading language](https://google.github.io/tour-of-wgsl/)
via a standalone language server (implementing the
[language server protocol](https://microsoft.github.io/language-server-protocol/)),
and a VS Code client extension that interfaces with it.## Architecture
This workspace is a monorepo. Specific documentation for the individual packages
contained in this repo can be found under their respective project directories
(under `packages`).User-facing documentation for the VS Code extension can be found under
`packages/client/README.md`.### Workspace Overview
* `packages/client` — The VS Code extension / LSP client implementation
* `packages/grammar` — The TextMate grammar, providing fast first-pass
syntax highlighting for VS Code
* `packages/parser` — A fast, standalone, hand-written recursive descent parser
for WGSL
* `packages/server` — The LSP server implementation### Quick Start
* Install [Node.js LTS](https://nodejs.org/en/download) ≥ v20.12.2
* Install [Rust](https://www.rust-lang.org/learn/get-started) Stable and Nightly
channels
* Install JavaScript dependencies
```sh
npm ci
```
* Build and install the extension locally
```sh
npx nx build client --package --install
```> [!NOTE]
> Nightly Rust is needed only for the server's `build` command, because it uses
> the unstable `--out-dir` argument to place the compiled executable in the
> correct location for local development.### Build System Overview
The repo is managed by [Nx](https://nx.dev), a flexible, polyglot monorepo
manager and build-system framework written in TypeScript. Workspace
configuration is defined in `nx.json` at the root of the repository, while
individual project configurations are defined in `project.json` files inside the
corresponding project directories.Commands can be written in the form
```sh
npx nx [options]
```
or
```sh
npx nx run : [options]
```
Where `` is the `name` specified in the `project.json` for a given
project, and `` is a key of the `targets` object in that same file.All of the heavy lifting is done with purpose-built Nx plugins maintained by
this project's primary contributor:* `@vscode-devkit/nx` — https://github.com/dannymcgee/vscode-devkit
* `@nxrs/cargo` — https://github.com/nxrs/cargo