Vexon Language Extension Update
A new release of the Vexon Language extension is ready. This update brings a self‑contained runtime and CLI into the extension package, streamlined Run and Compile workflows, and an easier developer experience for anyone building or using Vexon projects in VS Code. Below I walk through what changed, why it matters, how to use it, and what comes next.
What Changed
Vendored runtime and CLI:
vexon_core.jsandvexon_cli.jsare now included inside the extension undervendor/. The extension will use this vendored CLI by default when present.Smart CLI resolution: The extension searches for
vexon_cli.jsin this order: user settingvexon.cliPath, vendoredvendor/vexon_cli.js, workspace root, and then by walking up parent folders from the active file.Run and Compile commands: Two commands — Run Vexon and Compile Vexon — are exposed as status bar buttons and commands. They launch the CLI in the integrated terminal so you can see compiler and runtime output directly.
Packaging ready: The
.vsixpackaging now includes thevendor/folder so users who install the extension get the runtime and CLI out of the box.Graceful fallback: If you later switch to a shared package or local link, the extension will still work; it prefers the vendored copy but accepts workspace or configured CLI paths.
Why This Matters
Zero setup for users — New users no longer need to copy runtime files into every project. Install the extension and you can run
.vxfiles immediately.Consistent behavior — Vendoring ensures the extension uses a known runtime version, reducing “works on my machine” problems.
Flexible for developers — If you prefer to keep a project‑specific CLI, the extension still supports that. If you want to iterate on the core, you can use
npm link, afile:dependency, or replace the vendored files.Better UX — Running and compiling from the integrated terminal keeps output, errors, and interactive prompts in one place, improving debugging and iteration speed.
How to Use It
Install the extension
Build the
.vsixwithvsce packageor install the published extension from the Marketplace.Confirm
vendor/vexon_core.jsandvendor/vexon_cli.jsare present in the extension folder or in the packaged.vsix.
Run a file
Open a
.vxfile in VS Code.Click the Run Vexon status bar button or run the command Vexon: Run File.
The integrated terminal will run a command like:
node "<path-to-extension>/vendor/vexon_cli.js" run "<path-to-file>.vx"
Compile to EXE
Click Compile Vexon or run Vexon: Compile File.
The CLI will compile the file and generate a JS runner and optionally an EXE using
pkgif available.
Custom CLI location
Set the absolute path in workspace settings:
"vexon.cliPath": "C:\\tools\\vexon\\vexon_cli.js"
Or place
vexon_cli.jsin your project root; the extension will detect it automatically.
Developer Notes
Vendored files are tracked:
vendor/is included in the extension package. If you update the core, commit the changes so users receive the update.Fallback require pattern: The extension and CLI use local requires so you can later replace the vendored core with a package without changing extension code.
Packaging: Ensure
package.jsonincludes"vendor/"in thefilesarray before runningvsce package.Testing: Use the Extension Development Host (F5) to validate Run/Compile flows and terminal output.
Future migration: When you’re ready, you can move the core into a local package (
file:), a monorepo workspace, or publish it to a private registry. The extension already supports those workflows viavexon.cliPathand workspace detection.
What’s Next
Improved grammar and snippets — richer syntax highlighting and code snippets for common Vexon patterns.
Integrated debugging — explore adding a debug adapter so you can set breakpoints and step through Vexon code.
Automated CI packaging — a GitHub Actions workflow to build and publish
.vsixartifacts automatically.Optional installer CLI — make
vexonavailable as a global CLI via a local package for users who prefer a system tool.
Closing
This update focuses on making Vexon easier to use and maintain. Vendoring the runtime inside the extension removes friction for new users while keeping flexibility for power users and contributors. If you want, I can generate a sample .vx file for testing, a GitHub Actions workflow to build the .vsix, or a short README you can include in vendor/ describing how to switch to a package-based setup.

No comments:
Post a Comment