How Wasmer built a Node.js runtime for the edge using Codex

How Wasmer built a Node.js runtime for the edge using Codex

Wasmer has developed Edge.js, a JavaScript runtime that allows Node.js workloads to run within a WebAssembly (Wasm) sandbox. This enables the deployment of JavaScript applications, Model Context Protocol (MCP) servers, and AI agents at the edge without the need for Docker containers.

Accelerated Development Timeline

Wasmer reduced the development cycle for Edge.js from an estimated one year to just two weeks by leveraging OpenAI's Codex. According to Syrus Akbary Nieto, Founder and CEO of Wasmer, the use of AI increased development speed by 10x to 20x, allowing a small team to execute a project that would have previously been reserved for large companies with more resources.

Technical Implementation and Debugging

Codex was utilized throughout the entire development lifecycle, from the initial architectural design to final polishing. The tool's ability to reason across different levels of abstraction and languages was critical for the project's success:

  • Low-Level Debugging: Codex assisted in identifying root causes of bugs using console logs to trace calls and utilizing low-level debuggers like LLD to access assembly-level data.
  • C++ Expertise: The tool identified subtle C++ issues that the engineering team, who were not C++ experts, might have otherwise missed.
  • Architectural Guidance: The team shifted from manual coding in the IDE to a high-level guiding role, where Codex generated the code based on the team's direction.

Implications for Edge Computing

By successfully implementing a Node.js runtime in a Wasm sandbox, Wasmer has become the first cloud host to provide full Node.js capabilities at the edge layer. This removes platform restrictions and allows for a more scalable edge computing platform that functions across both local and global environments.

"We are actually moving out of the IDE itself. We’re not touching as much the code, we are just guiding it where we want it to go."

• Syrus Akbary Nieto, Founder and CEO

Sources