NormalScript Introduces a Compact Virtual Machine for JavaScript Scripting
Developers working within modern Node and Bun environments have a new option for running lightweight scripts and agent code modes with the introduction of NormalScript. Designed to embed directly into Node version 24 and above, or Bun version 1.4 and upward, the tool operates as a small bytecode virtual machine without requiring WebAssembly modules, native addons, or separate worker threads. This architecture allows teams to execute embedded scripts seamlessly within their primary application process, eliminating the need to manage a secondary runtime infrastructure.
The virtual machine runs a strict-mode subset of modern JavaScript, supporting features such as async functions, generators, classes, and top-level await expressions. To maintain predictability and security, NormalScript deliberately excludes ambient input and output APIs, meaning common globals like fetch, file system modules, process utilities, and DOM access are not available out of the box. Instead, developers explicitly pass external capabilities into the runtime as plain host functions, ensuring that scripts operate within tightly controlled boundaries. Additionally, the environment lacks traditional timers and event loop methods, forcing scripts to execute linearly to completion.
A key feature of the platform is its ability to handle long-running workflows through state persistence. Developers can suspend an active execution mid-flight, convert its state into bytes using serialization methods, and resume the process anywhere at a later time. The API is built primarily around Promises, allowing for flexible integration with asynchronous workflows. By enabling teams to execute plugins, small automation tasks, and agent logic directly within their existing application stack, NormalScript offers a streamlined approach to embedded scripting without unnecessary architectural overhead.