Important
This project is retired. Replace Jazor.LibNode with Microsoft's
Microsoft.JavaScript.LibNode version 26.0.18. It ships Node.js v26.13.1
for Windows, Linux, and macOS on x64 and ARM64.
Microsoft.JavaScript.LibNode on NuGet
dotnet remove package Jazor.LibNode
dotnet add package Microsoft.JavaScript.LibNode --version 26.0.18The documentation below describes the historical Jazor.LibNode releases. For the Linux HTTPS crash reported against Jazor.LibNode 0.2.0, see #1.
This project builds Node.js as a native shared library for embedding JavaScript in .NET applications, referencing and compatible with Microsoft's Node API for .NET.
- Build the latest Node.js LTS with the embedding C API required by Microsoft's managed interop layer.
- Load JavaScript packages and call JS APIs in the same process as a .NET application.
- Reuse upstream native and managed tests to verify the compiled library.
The current build is Node.js v26.13.1 (Lithium LTS), verified with Microsoft.JavaScript.NodeApi 0.9.36. Source archives, commits and patches are pinned; builds do not resolve a floating latest version.
Version 0.2.0 is published for Linux and Windows on x64 and ARM64, with native, managed and actual NuGet consumer tests passing on both platforms. macOS builds remain future candidates. See the release.
- Build, test and package instructions
- Native source and embedding port
- Compatibility results and platform requirements
- Platform and architecture support
- Audit of 66 open upstream issues
- Releases and NuGet publishing
- Node API for .NET documentation
Reference Microsoft.JavaScript.NodeApi 0.9.36 and Jazor.LibNode 0.2.0. The latter
provides the native runtime, serving the same role as Microsoft.JavaScript.LibNode.
Reference one native runtime package in the application.
dotnet add package Microsoft.JavaScript.NodeApi --version 0.9.36
dotnet add package Jazor.LibNode --version 0.2.0NodeApi resolves the appropriate native library from the package automatically:
using Microsoft.JavaScript.NodeApi;
using Microsoft.JavaScript.NodeApi.Runtime;
using var platform = new NodeEmbeddingPlatform(new NodeEmbeddingPlatformSettings());
using var runtime = platform.CreateThreadRuntime();
runtime.Run(() =>
{
var answer = (int)JSValue.RunScript("21 * 2");
Console.WriteLine(answer); // 42
});Create one platform per process. Dispose its runtimes before disposing the platform. For module imports, async calls and errors, see the tested NuGet consumer.
The package projects produce native runtime assets without adding another managed interop layer:
Jazor.LibNode— metapackage for the complete set of validated runtime packages.Jazor.LibNode.<rid>— platform library underruntimes/<rid>/native/, with source/build metadata and licenses. Version 0.2.0 supportslinux-x64,win-x64,linux-arm64andwin-arm64.
The Linux development candidate passes 60 native embedding cases, 22 Microsoft embedding/GC tests, 38 separate mock tests, and an isolated consumer using the actual Microsoft NodeApi NuGet package. The local binary requires glibc 2.39 and GLIBCXX 3.4.32; older distributions need a separate build and validation.
Windows x64 passes the same 60 native, 22 embedding/GC and 38 separate mock cases,
plus the actual NodeApi NuGet consumer on Windows Server 2022. Install the Microsoft
Visual C++ 2015–2022 x64 Redistributable for its VC runtime dependencies. The tested
Windows .NET host uses <CETCompat>false</CETCompat>; see the
upstream issue audit for the managed-layer limitations.
All four platforms also pass 30 Node 26 feature checks through the actual NuGet consumer, including Temporal, Web APIs, crypto, workers, WebAssembly, TypeScript and SQLite. The final release metapackage repeats these checks on each platform.
Candidate packages are generated under artifacts/packages/;
see development instructions to reproduce them.
For building, testing and packaging, see README-DEV.md. The Linux candidate workflow builds from source or imports a verified local build, then repeats upstream compatibility tests, NuGet consumers and issue regressions and preserves their reports. Importing a local build skips V8 compilation. Release tags publish the verified package set through GitHub Actions, using NuGet trusted publishing. See the release guide for setup and dry runs.
Build and packaging code is licensed under the MIT License. Native distributions include Node.js and embedding-source licenses and third-party notices. See NOTICE.txt for source attribution.
This is an independent build, not a Microsoft release.