-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Context
All building blocks exist:
- spar LSP server (
spar lsp) for editing support - spar-wasm compiles to wasm32-wasip2 (1.3MB)
- spar-render produces interactive HTML with ports, orthogonal routing, pan/zoom/selection
- etch HTML wrapper is self-contained (no external deps)
VS Code now supports WASM language servers via wasm-wasi-core.
Proposal
VS Code extension that:
- Activates on
.aadlfiles - Runs spar LSP (native binary or WASM) for syntax/diagnostics/go-to-def
- Opens a WebviewPanel with live architecture diagram (interactive HTML from etch)
- Re-renders on file save (
onDidSaveTextDocument) - Supports
?highlight=for click-to-navigate between code and diagram
Architecture options
- A: Native binary — extension bundles
sparbinary, shells out for render. Simpler, cross-platform via release binaries - B: WASM — loads spar-wasm in VS Code's WASI runtime. No binary distribution needed, but WASI support is newer
- C: Hybrid — WASM for LSP, native for render (render needs filesystem access)
References
- VS Code WebviewPanel API
- VS Code WASM language server support
- spar-wasm WIT:
pulseengine:rivet/renderer
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels