Spin + StarlingMonkey Equals JavaScript for WebAssembly
VIENNA — It took a while, but JavaScript deployment with WebAssembly (Wasm) has seen a nice development, highlighted here with how Fermyon’s Spin offers a more direct route for deploying JavaScript in a Wasm module. With the Spin JavaScript SDK, this approach addresses previous limitations and is considered more elegant.
Additionally, the Bytecode Alliance has contributed to a new JavaScript runtime called StarlingMonkey, which enhances Fetch API support and compatibility with Node.js APIs. A new JavaScript SDK built on Starling Monkey is introduced, aiming to expand the capabilities of JavaScript for backend services, aligning with the goals of the Bytecode Alliance.
A key feature is how Spin development is helpful for providing a more direct way to deploy JavaScript code with WebAssembly. This method of deployment is more elegant than before and solves a lot of problems and limitations that came with JavaScript. This approach with the Spin JavaScript SDK offers a direct route for JavaScript implemented in a Wasm module for deployment.
“The main thing is that we did two things: First, we contributed to a new JavaScript runtime called StarlingMonkey, which is now part of the Bytecode Alliance. Second, we implemented a new SDK for Spin,” Mikkel Mørk Hegnhøj, Fermyon’s head of product and developer relations, told me during Open Source Summit EU here in Vienna. “The new JavaScript SDK, built on top of Starling Monkey essentially helps us provide proper Fetch support for the Fetch API, but it also offers a much wider range of compatibility with Node.js APIs. A lot of the stuff you used to solve with Node.js for backend services can now be handled by JavaScript in this new environment.”
Spin JavaScript SDK is under the Fermyon’s Spin umbrella. Spin is a developer tool you can use to build serverless WebAssembly workloads or apps. Spin supports a wide range of programming languages such as Rust, C++ and others in addition to JavaScript. With the Spin JavaScript SDK, language-specific commands needed to compile JavaScript code into WebAssembly are processed. Spin was also designed to simplify the development process through access to templates for creating apps, compiling them to WebAssembly and testing them locally with the bundled runtime in the Spin CLI before deploying to different environments, according to Spin documentation.
Let’s Run It
In order to add your JavaScript code to the Spin JavaScript SDK, you need to first install Spin.
The templates are installed with:
![]()
Create and build a new app:
![]()
Create a new app from the template installed in the previous step:

Change directory into the app:

Install the dependencies and build the app: