RFC5: Oden: The Server-First, JavaScript-esque Runtime

This document defines a project titled Oden.js (an anagram of Node and Deno). It is intended to be a way to run "JavaScript" on a server but with the following limitations:

  • Only JavaScript features that are beneficial in a server context are retained
  • Many existing features are hidden behind require() calls
  • This is essentially a fork of JavaScript (via V8)
  • This is essentially a fork of Node.js (by modifying APIs)

Overview #

Node.js API Modifications #

Based on the number of modifications required this would need to be implemented as a "hard fork" of Node.js. I don't think it would be feasable to float patches on top of Node.js.

New Internal Modules #

  • TODO

Dropped Functionality #

  • The Buffer class is removed entirely since TypedArray should suffice.
  • Either completely remove require() or completely remove import. One of CJS or ESM is fine.

JavaScript & V8 Modifications #

I don't know much about V8 but I think it would also need to be a "hard fork" of V8.

Dropped Functionality #

  • typeof is modified so that typeof null returns the string 'null'
  • TODO: can eval be removed entirely?
  • TODO: explain object stringifying philosophy, returning JSON, Map and Set

History Log

Complete History Log
Operation Instigator Revision When
New RFC revision created: 13 Thomas Hunter II r13
New RFC revision created: 12 Thomas Hunter II r12
New RFC revision created: 11 Thomas Hunter II r11
New RFC revision created: 10 Thomas Hunter II r10
New RFC revision created: 9 Thomas Hunter II r9
New RFC revision created: 8 Thomas Hunter II r8
RFC visibility changed from Internal to Public Thomas Hunter II r7
New RFC revision created: 7 Thomas Hunter II r7
RFC status changed from draft to review Thomas Hunter II r6
New RFC revision created: 6 Thomas Hunter II r6
Global Error Handler