Announcing Vexon 0.4: From Interpreter to Ecosystem
We are excited to unveil Vexon 0.4, the most significant update to the language yet. This release transitions Vexon from a simple tree-walking interpreter into a robust, bytecode-driven environment capable of building real-world applications.
Whether you are looking for better performance, asynchronous capabilities, or the ability to distribute your code as standalone executables, Vexon 0.4 delivers.
🚀 Key Features in 0.4
📦 Native Compilation to EXE
The biggest addition in this update is the new Vexon CLI. You can now take any .vx source file and compile it into a standalone Windows executable.
Command:
node vexon_cli.js compile <file.vx>.How it works: Vexon packages your source code, the bytecode generator, and a Node.js runtime into a single
.exeusingpkg, making distribution easier than ever.
⏳ Asynchronous Power: Sleep & Timers
Vexon now supports non-blocking operations, allowing for more complex logic like polling or scheduled tasks.
sleep(ms): Pause execution without locking the host process.setTimeout&setInterval: Schedule Vexon functions to run later or repeatedly.clearTimeout&clearInterval: Full control over your scheduled tasks.
🛡️ Robust Error Handling
Writing reliable code is now possible with the introduction of a complete Try/Catch system.
Unwinding: The VM now features a
tryStackthat allows the engine to safely unwind frames and recover from errors.Custom Exceptions: Use the
throwkeyword to trigger error handling logic.Native Wrappers: Even native JavaScript errors are caught and surfaced as Vexon error objects to prevent the VM from crashing.
🌐 Improved Networking with fetch
The fetch builtin has been overhauled to be more portable.
It automatically detects the best available method: native Node 18+ fetch,
node-fetch, or a built-inhttpsfallback.It now returns a comprehensive object containing
status,headers,text, and automatically parsedjson.
🛠️ Under the Hood: Performance & Safety
The Vexon VM is now "hardened" for production-style environments:
Instruction Watchdog: A new
maxTickssafety limit prevents infinite loops from freezing your system.Smart Logical Operators:
&&and||now support short-circuit evaluation, improving both speed and safety.Circular-Safe Imports: The module system has been refined to handle complex file relationships without double-loading.
Getting Started
To run your first Vexon 0.4 program:
Ensure you have the new
vexon_core.jsandvexon_cli.jsin your directory.Run your file directly:
node vexon_cli.js run main.vx.Or compile it:
node vexon_cli.js compile main.vx.
What will you build with Vexon 0.4? We can't wait to see your projects!

No comments:
Post a Comment