Skip to content
This repository was archived by the owner on May 7, 2022. It is now read-only.
This repository was archived by the owner on May 7, 2022. It is now read-only.

Should Node.js be VM neutral in the future? #54

@mikeal

Description

@mikeal

First and foremost, a bit of a reality check: The "Node.js Platform" is already available on a variety of VMs other than the V8 runtime we ship with:

  • Compile-to systems like the early Tessel project and now Samsung's JerryScript/IoT.js.
  • Microsoft ships a Node.js on top of Chakra for XBOX, Windows Phone and Windows 10 IoT.
  • Nodyn is a Node.js API on top of the JVM.
  • JXCore is an "extended Node.js API" that can bind to Spidermonkey, V8 and Chakra.

Because of Node.js' massive ecosystem of packages, educational materials, and mind-share we should expect that in the future this will continue. Part of Node.js going everywhere is that it may need to be on other VMs in environments V8 can't go. There's not much that we can do to prevent this.

So the question becomes: Should Node.js Core move towards being VM neutral and supporting more VMs in the main project?

Some of the advantages would be:

  • Normalization of the Native API (which currently breaks every major release)
  • De-facto standard for any JS VM to add Node.js support.
  • Centralization of test infrastructure would increase stability of non-V8 platforms.
  • Standardization of API could allow us to adopt new V8 versions outside of breaking major releases.

There's a long discussion about how to do this. Without guarantees from all the target VM vendors that they will support this neutral API it could fall on us to make that work. Historically V8 has made drastic API changes that were not supportable through the API nan had implemented.

There's also an open question about how to structure the tree and build and if we should continue sticking V8 and every supported VM in a vendor directory or pulling it in during build time.

Anyway, let's have the discussion :)

@nodejs/ctc

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions