Elide runs Node programs, node:* modules and npm packages; this page lists what changes when you switch.
Run the same code
elide app.js # or: elide run app.js
elide app.ts # no compile step, no tsconfig.json
elide install --ecosystems=npm # dependencies from package.json
elide test # node:test filesnode:fs,node:http,node:worker_threadsand most other built-ins load with or without thenode:prefix.- CommonJS and ES modules both work.
- Tests written with
node:testandnode:assertrun underelide test. http.createServerserves as in Node. A module that default-exports afetchhandler, or callsElide.serve({ fetch }), also serves.
Start with JavaScript and TypeScript. Module status is in the API Overview; suite results are in the Compatibility Matrix.
What changes
| Node | Elide |
|---|---|
node app.js | elide app.js |
npm install | elide install --ecosystems=npm; plain elide install skips npm |
package-lock.json | aube-lock.yaml |
npm run build | elide run build |
npx tool | elide run tool for a tool in node_modules/.bin; no download-and-run |
node --test | elide test |
node --inspect app.js | elide run --debugger=cdp app.js |
node --watch app.js | No equivalent |
node --env-file=.env app.js | Call process.loadEnvFile() in code |
node --permission --allow-fs-read=. | elide --allow-read=. app.js; see Sandbox and Limits |
node:worker_threads | Same module; new Worker honors only workerData, eval, transferList and env |
node:sqlite DatabaseSync | Database from elide:sqlite; see Database modules |
Elide does not set NODE_ENV.
Benchmarks
Startup: hyperfine -N -w 10 on a 24-core Linux workstation, running a hello-world script.
| Runtime | Command | Mean |
|---|---|---|
| Node | node hello.js | 11.4 ± 0.8 ms |
| Elide | elide run hello.js | 2.1 ± 0.1 ms |
| Bun | bun hello.js | 1.8 ± 0.2 ms |
| Deno | deno run hello.js | 6.1 ± 0.3 ms |
Bun starts faster than Elide.
Serving: wrk -t12 -c256 -d10s against a hello-world server. Each server ran on the same 24 CPUs and wrk on 24
others.
| Runtime | Requests/s | Mean latency |
|---|---|---|
| Node | 91,464 | 3.22 ms |
| Elide | 600,352 | 419 µs |
| Bun | 147,742 | 1.70 ms |
| Deno | 280,666 | 0.89 ms |
Every server ran with its defaults: Node, Bun and Deno serve on one thread, Elide on several. This compares defaults, not tuned deployments.
Strengths
- Starts a hello-world script in 2.1 ms against Node’s 11.4 ms.
- Runs
.ts,.mtsand.ctsfiles directly, with no build step ortsconfig.json. - Served 600,352 requests per second against Node’s 91,464, both with default settings.
- Scopes network access by host and subprocesses by command:
--allow-net=api.example.com,--allow-run=git. - Limits workers, open files, heap and run time:
--limit=workers=4,--limit=fds=128,--max-mem=512m,--timeout=30s. - Includes SQLite, PostgreSQL and MySQL drivers as
elide:sqlite,elide:postgresandelide:mysql.
Weaknesses
- Node-API compatibility is 86.8% and WinterTC 95.9% on their test suites.
node:http2,node:cluster,node:inspectorandnode:wasithrowERR_UNKNOWN_BUILTIN_MODULE.https.createServerthrowsERR_HTTPS_SERVER_UNSUPPORTED; terminate TLS in front ofhttp.createServer.- No download-and-run like
npx, no--watchor--env-file, and noWebSocketglobal. - No bundler:
elide web buildtransforms each file and keeps its imports. - No macOS Intel build; macOS releases are Apple Silicon only.