- Get a minimal project that includes v8, libuv, and the various uv bits @indutny has been putting together building everywhere.
- At that point build in & expose fs, tcp, and tls bindings and a module
system (via
require
) to js.
- I might do this in a separate project using
gclient
&gn
to pull in the minimal binding layer.
- Whenever a node global (
process
) is accessed, or a node builtin module is requiredrequire('fs')
, short circuit the lookup torequire('@nojs/node-<target>')
. - Long term goal is to get
npm install
working and bundlenpm
with the project.
My (handwave-y) plans are — and you'll probably find something you like and something you dislike here:
- Steer closer to TC39:
- The minimal API will use
Promise
.async / await
is coming. - No streams at first. Possibly include streams from WHATWG's
ReadableStream
spec later. - No
EventEmitter
(except via backcompat.) Maybe somedayObservables
.
- The minimal API will use
- Steer closer to (newer) Google tools:
- Build with
gn
andgclient
, keep deps up to date withgclient sync
.
- Build with
- Focus on FFI. (Insert so much 👋 handwaving 👋 here)
- With an eye towards @indutny's jit.js, heap.js, & mmap.js, explore exposing
mmap
in order to create callable executable code from JS (possibly only for core functionality, but maybe not.) - Binary compat with Node later.
- @dominictarr had the excellent idea that the build tools should be dockerized.
- With an eye towards @indutny's jit.js, heap.js, & mmap.js, explore exposing
- Stick with Node's decision on ES modules. If Node zigs, Nojs zigs. No zagging, never zagging.
- Interoperability/backcompat is key.