Microsoft.JavaScript.NodeApi
0.8.8
Prefix Reserved
See the version list below for details.
dotnet add package Microsoft.JavaScript.NodeApi --version 0.8.8
NuGet\Install-Package Microsoft.JavaScript.NodeApi -Version 0.8.8
<PackageReference Include="Microsoft.JavaScript.NodeApi" Version="0.8.8" />
paket add Microsoft.JavaScript.NodeApi --version 0.8.8
#r "nuget: Microsoft.JavaScript.NodeApi, 0.8.8"
// Install Microsoft.JavaScript.NodeApi as a Cake Addin #addin nuget:?package=Microsoft.JavaScript.NodeApi&version=0.8.8 // Install Microsoft.JavaScript.NodeApi as a Cake Tool #tool nuget:?package=Microsoft.JavaScript.NodeApi&version=0.8.8
Node API for .NET: JavaScript + .NET Interop
This project enables advanced interoperability between .NET and JavaScript in the same process.
- Load .NET assemblies and call .NET APIs in-proc from a JavaScript application.
- Load JavaScript packages and call JS APIs in-proc from a .NET application.
Interop is high-performance and supports TypeScript type-definitions generation, async (tasks/promises), streams, and more. It uses Node API so it is compatible with any Node.js version (without recompiling) or other JavaScript runtime that supports Node API.
⚠️ Status: Public Preview - Most functionality works well, though there are some known limitations around the edges, and there may still be minor breaking API changes.
Documentation
Getting-started guidance, feature details, and API reference documentation are published at https://microsoft.github.io/node-api-dotnet
Minimal example - JS calling .NET
// JavaScript
const Console = require('node-api-dotnet').System.Console;
Console.WriteLine('Hello from .NET!'); // JS writes to the .NET console API
Minimal example - .NET calling JS
// C#
interface IConsole { void Log(string message); }
var nodejs = new NodejsPlatform(libnodePath).CreateEnvironment();
nodejs.Run(() =>
{
var console = nodejs.Import<IConsole>("global", "console");
console.Log("Hello from JS!"); // C# writes to the JS console API
});
Packages
Depending on the scenario, either NPM or NuGet packages may be used:
- NPM:
node-api-dotnet
- NuGet:
Microsoft.JavaScript.NodeApi
See Packages & Releases for details.
Development
For information about building, testing, and debugging this project, see README-DEV.md.
Contributions require agreement to the Contributor License Agreement.
Code of Conduct
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Trademarks
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.
<br/> <br/>
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 is compatible. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.7.2
- Microsoft.Bcl.AsyncInterfaces (>= 7.0.0)
- System.Memory (>= 4.5.5)
-
.NETStandard 2.0
- Microsoft.Bcl.AsyncInterfaces (>= 7.0.0)
- System.Memory (>= 4.5.5)
-
net6.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on Microsoft.JavaScript.NodeApi:
Repository | Stars |
---|---|
microsoft/node-api-dotnet
Advanced interoperability between .NET and JavaScript in the same process.
|
Version | Downloads | Last updated |
---|---|---|
0.8.16 | 249 | 10/15/2024 |
0.8.15 | 196 | 10/4/2024 |
0.8.14 | 102 | 10/3/2024 |
0.8.13 | 176 | 9/23/2024 |
0.8.9 | 248 | 9/6/2024 |
0.8.8 | 158 | 9/4/2024 |
0.8.7 | 177 | 9/3/2024 |
0.8.6 | 97 | 9/3/2024 |
0.8.5 | 116 | 9/1/2024 |
0.8.4 | 101 | 9/1/2024 |
0.8.3 | 193 | 8/19/2024 |
0.8.2 | 134 | 8/16/2024 |
0.8.1 | 109 | 8/15/2024 |
0.7.42 | 121 | 8/14/2024 |
0.7.41 | 124 | 8/13/2024 |
0.7.40 | 123 | 8/12/2024 |
0.7.39 | 107 | 8/12/2024 |
0.7.38 | 132 | 8/8/2024 |
0.7.37 | 92 | 8/6/2024 |
0.7.36 | 82 | 8/1/2024 |
0.7.35 | 72 | 8/1/2024 |
0.7.34 | 10,773 | 7/27/2024 |
0.7.33 | 91 | 7/24/2024 |
0.7.32 | 84 | 7/24/2024 |
0.7.31 | 299 | 7/22/2024 |
0.7.30 | 200 | 7/17/2024 |
0.7.29 | 81 | 7/16/2024 |
0.7.28 | 54 | 7/15/2024 |
0.7.26 | 83 | 7/12/2024 |
0.7.19 | 244 | 6/21/2024 |
0.7.18 | 325 | 6/17/2024 |
0.7.17 | 120 | 6/14/2024 |
0.7.16 | 132 | 6/14/2024 |
0.7.14 | 201 | 5/16/2024 |
0.7.13 | 141 | 5/15/2024 |
0.7.12 | 199 | 5/14/2024 |
0.7.11 | 142 | 5/9/2024 |
0.7.10 | 176 | 5/6/2024 |
0.7.9 | 129 | 5/2/2024 |
0.7.8 | 189 | 4/19/2024 |
0.7.7 | 130 | 4/17/2024 |
0.7.6 | 126 | 4/16/2024 |
0.7.5 | 145 | 4/14/2024 |
0.7.4 | 119 | 4/12/2024 |
0.7.3 | 124 | 4/11/2024 |
0.7.2 | 117 | 4/10/2024 |
0.7.1 | 146 | 4/8/2024 |
0.6.8 | 144 | 4/8/2024 |
0.6.7 | 126 | 4/8/2024 |
0.6.6 | 127 | 4/8/2024 |
0.6.5 | 149 | 4/5/2024 |
0.6.4 | 134 | 4/5/2024 |
0.6.3 | 156 | 3/29/2024 |
0.6.2 | 147 | 3/27/2024 |
0.6.1 | 163 | 3/26/2024 |
0.5.19 | 373 | 3/23/2024 |
0.5.18 | 144 | 3/21/2024 |
0.5.17 | 127 | 3/21/2024 |
0.5.16 | 189 | 3/20/2024 |
0.5.15 | 134 | 3/20/2024 |
0.5.14 | 146 | 3/20/2024 |
0.5.13 | 148 | 3/14/2024 |
0.5.12 | 144 | 3/12/2024 |
0.5.11 | 127 | 3/12/2024 |
0.5.10 | 128 | 3/12/2024 |
0.5.8 | 141 | 3/12/2024 |
0.5.7 | 149 | 3/11/2024 |
0.5.6 | 139 | 3/11/2024 |
0.5.4 | 142 | 3/8/2024 |
0.5.2 | 142 | 3/1/2024 |
0.5.1 | 137 | 2/27/2024 |
0.4.34 | 310 | 2/18/2024 |
0.4.33 | 386 | 2/6/2024 |
0.4.27 | 508 | 12/14/2023 |
0.4.26 | 351 | 11/21/2023 |
0.4.25 | 130 | 11/21/2023 |
0.4.24 | 128 | 11/21/2023 |
0.4.23 | 125 | 11/21/2023 |
0.4.22 | 473 | 11/11/2023 |
0.4.21 | 131 | 11/10/2023 |
0.4.20 | 126 | 11/10/2023 |
0.4.19 | 118 | 11/9/2023 |
0.4.18 | 139 | 11/6/2023 |
0.4.17 | 125 | 11/5/2023 |
0.4.16 | 174 | 10/26/2023 |
0.4.4 | 444 | 6/12/2023 |
0.3.2 | 163 | 5/28/2023 |
0.3.1 | 152 | 5/17/2023 |
0.2.33 | 242 | 5/17/2023 |
0.2.32 | 167 | 5/16/2023 |
0.2.31 | 151 | 5/9/2023 |
0.2.30 | 141 | 5/9/2023 |
0.2.29 | 147 | 5/9/2023 |
0.2.28 | 145 | 5/9/2023 |
0.2.27 | 138 | 5/7/2023 |
0.2.26 | 189 | 5/3/2023 |
0.2.25 | 180 | 5/1/2023 |
0.2.24 | 149 | 5/1/2023 |
0.2.23 | 166 | 4/30/2023 |
0.2.22 | 155 | 4/29/2023 |
0.2.21 | 168 | 4/28/2023 |
0.2.20 | 187 | 4/26/2023 |
0.2.19 | 155 | 4/26/2023 |
0.2.18 | 195 | 4/25/2023 |
0.2.17 | 157 | 4/25/2023 |
0.2.16 | 175 | 4/24/2023 |
0.2.15 | 198 | 4/23/2023 |
0.2.14 | 163 | 4/23/2023 |
0.2.13 | 178 | 4/19/2023 |
0.2.12 | 174 | 4/18/2023 |
0.2.11 | 249 | 4/17/2023 |