microsoft/node-api-dotnet
소개
같은 프로세스에서 .NET과 JavaScript 간의 고급 상호 운용성을 제공합니다.
기타 프로젝트측정된 스타 증가
- in 24h
- +2
- in 7 days
- +4
- in 15 days
- +6
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalNode 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.
:warning: 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# (references Microsoft.JavaScript.NodeApi + Microsoft.JavaScript.LibNode)
using NodeEmbeddingPlatform platform = new(new NodeEmbeddingPlatformSettings());
using NodeEmbeddingThreadRuntime nodejs = platform.CreateThreadRuntime(
settings: new NodeEmbeddingRuntimeSettings { MainScript = "" });
nodejs.Run(() => nodejs.Import("global", "console").CallMethod("log", "Hello from JS!"));
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 [email protected] 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.

관련 프로젝트 살펴보기
불러오는 중…