npm install Should Never Compile: Killing Native Addons
SessionTrack AEnglish
Every JavaScript team knows the ritual: npm install fails because one package demands Python 2 for node-gyp, another ships no ARM64 prebuild, and a third was compiled against Node.js 20's ABI right before you upgraded to 22. Teams treat this as weather: unpleasant, unavoidable, arriving on schedule with every new hire's laptop. It is not weather. It is architecture, and the architecture has changed.
The premise of this session is one sentence: npm install should never compile anything. Compilation belongs on the maintainer's machine, once, into an artifact that runs identically everywhere. As of 2026 that artifact exists: the WebAssembly Component, built on WASI 0.2 and WIT (WebAssembly Interface Types), a language-neutral typed contract that lets a Rust library and a JavaScript function compose with generated TypeScript types and no glue code. This is shipping technology, not a proposal. Cloudflare Workers links Components in production, and the Bytecode Alliance's wasi:http, wasi:filesystem, and wasi:cli interfaces are stable.
The live demo carries the argument. We compile Rust's image crate (the dominant image-processing library in the Rust ecosystem) into a single Component with cargo-component, generate TypeScript bindings with jco, and run the same unmodified artifact in three places: a Node.js service, a Bun test suite, and a Cloudflare Worker where it composes at deploy time with a JavaScript response-formatting Component through a WIT interface. No node-gyp, no prebuild matrix, full type safety. The demo repo is public and reproducible the same afternoon. Then the honest part, because "rewrite it in WASM" is only advice when it comes with numbers.
We benchmark five workload categories against equivalent native N-API addons: image resizing runs within 15% of native throughput with WASM SIMD; compression and hashing are closer; large-document JSON parsing is wider. We name the current gaps precisely (incomplete wasi:filesystem coverage in the Cloudflare runtime, jco bindgen edge cases with WIT variant types, the capability wall around direct OS-level I/O) and close with a decision framework: migrate now, wait for the next WASI revision, or stay native, plus the hybrid strategy in between.

Neeraj Pandey
Neeraj is the co-founder of Lyntcube, a AI native digital workforce for Real Estate. Over the years, he has worked on a variety of full-stack software and data-science applications, as well as computational arts, and likes the challenge of creating new tools and applications, and is an active speaker with talks and tutorials presented at multiple conferences.
Past performances: http://n4jp4y.com/talks