Pragmatic, English-forward DSL with a working compiler, VM, runtime, and package manager.
src/tokenizer– indentation-aware tokenizersrc/parser– AST generatorsrc/types– AST typessrc/ir– lowering to intermediate representationsrc/transpilers– TypeScript and Rust emitterssrc/runtime– pluggable runtime adapters (in-memory defaults)src/cli– CLI commands (compile,repl,run,install,publish,format,lint)docs/– deeper reference material (philosophy, runtime, stdlib, roadmap)
nvm use 24 # >=20 works; tests run on 24
pnpm install
pnpm run build
# Compile to TypeScript (links stdlib)
node dist/cli/index.js compile examples/user_profile.vcl --target ts --with-stdlib
# Run via interpreter
node dist/cli/index.js run examples/webapp.vcl --event "http GET /api/health"
# Run via VM
node dist/cli/index.js run examples/webapp.vcl --event "http GET /api/health" --vm
# Format / lint / check
node dist/cli/index.js format examples/user_profile.vcl
node dist/cli/index.js lint examples/webapp.vcl
node dist/cli/index.js check examples/webapp.vcl- A local icon theme lives in
.vscode/vcl-icon-theme; no marketplace download needed. - Install once from the repo root:
code --install-extension .vscode/vcl-icon-theme. - The workspace sets
workbench.iconThemetovcl-icons-local, so the VCL icon will appear after install/reload. If it doesn’t, run⌘⇧P→ “File Icon Theme” → choose “VCL Icons Local”.
cd web
pnpm install # first time only
pnpm run dev # opens VCL playground with live compile to TS/Rust- Indent defines blocks, statements end with
. - English-like control words (define, when, fetch, ensure, validate)
- Implicit async for I/O verbs
- Live docs: https://vibe-dun-five-vercel.app
- See
docs/README.mdfor the doc hub anddocs/sitefor the VitePress source.
Registry: set export VCL_REGISTRY=$HOME/.vcl-registry (default local path used by vcl install/publish).
Install CLI via npm (after publish): npm i -g @claywarren/vcl.
- Tokenizer hardened (indentation, multiline strings, escapes, imports).
- Parser + linker handle namespaced imports (
foo::bar), scheduling, and module inlining. - Transpilers: runnable TypeScript/Rust emitters; WASM text stub; optional sourcemaps.
- Runtime + VM: interpreter/VM parity, pluggable adapters; CLI
run --vm. - Package manager:
vcl install/publishwith local registry support; formatter/linter; LSP-style completion stub. - REPL prints TS preview; demo server remains in
scripts/demo-server.ts.