feat: integrate playground into workspace - #160
Merged
Conversation
|
Docs preview: https://vide.pascal-lab.net/preview/pr-160/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This change brings the playground into the Vizsla repository as first-class workspace code instead of maintaining a separate patched consumer. The Rust WASM entry point now lives under
crates/vizsla-lsp-wasm, the frontend lives underplayground, and the docs site imports the playground package directly instead of committing generateddocs/public/vizsla-labassets.Playground Architecture
flowchart LR subgraph Browser[Browser runtime] Component["<vizsla-lab> web component"] Monaco["Monaco editor + scenarios"] Client["Browser LSP client"] Worker["vizsla-lsp.worker"] end subgraph Wasm[WASM package] Adapter["JS FFI adapter"] Ffi["C ABI exports"] Server["vizsla::browser::BrowserServer"] end subgraph Core[Core Vizsla crate] State["GlobalState + main-loop event drain"] Vfs["browser VFS notification bridge"] Analysis["existing config, resolver, diagnostics"] end Component --> Monaco Monaco --> Client Client <--> Worker Worker <--> Adapter Adapter <--> Ffi Ffi <--> Server Server <--> State State <--> Vfs State --> AnalysisThe important boundary is that the WASM crate is now a thin FFI layer. It no longer path-includes private source files from the main crate; browser-specific LSP handling is exposed through
vizsla::browser::BrowserServer, so the playground uses the same analysis code through a real crate API.Other Changes
npm run build:wasmconsumes an already activated SDK.Validation
rustup run nightly cargo fmt --all -- --checkrustup run nightly cargo check -p vizsla-lsp-wasmrustup run nightly cargo clippy -p vizsla -p vizsla-lsp-wasm --all-targets -- -D warningsnpm ciinplaygroundnpm run build:wasminplaygroundnpm run build:embedinplaygroundnpm run buildinplaygroundnpm ciindocsnpm run buildindocs