nodejs / nodejs/node

Offer a C FFI for Node.js embedders

Open
#52,289 19 comments 14 reactions 1 assignee View on GitHub

@vmoroz is already working on this.

Since Apr 25, 2025.

embedding feature request never-stale node-api
Dominant language
JavaScript
Stars
122k
Forks
37.3k
Avg merge
4d 2h
Merged PRs (30d)
283

Description

What is the problem this feature will solve?

Node.js is prolific throughout the server-side world with many projects wanting to repackage the Node.js runtime and the associated standard library/resolution logic/Node.js-isms to offer it to customers such that they can reuse their existing tooling/dependencies.

Notable examples of this:

  • Rspack
  • Esbuild
  • Parcel
  • Supabase
  • AWS Lambda
  • etc

Currently, Node.js cannot be embedded in languages that only support native libraries with a C FFI (Rust, Dotnet, Go, etc).

This leads project maintainers to look for alternative embeddable runtimes that have incomplete Nodejs support, notably Deno (which is a great project in its own right, but lacks certain features that would necessitate consumers rewriting project code).

What is the feature you are proposing to solve the problem?
  • Expose Node.js embedding capabilities via a C FFI
  • Offer a static library to allow including Node.js within the embedding binary
What alternatives have you considered?
  • Embedding Deno
  • Removing the "Deno" parts of Deno and maintaining a light version with a focus on supporting the Node.js standard library
  • Maintaining a fork of Nodejs with a C FFI

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.