Skip to content

EYHN/napi-cs

Repository files navigation

This project is still in the early stages of development. All code, interfaces and features are unstable.

napi-cs

Inspired by napi-rs.

Experimental tool chain for build NodeJS modules with .NET 6.0 and C#.

napi-cs will compile your modules into a native (architecture specific) shared library with Native AOT, modules can be safely distributed without .NET installation.

Getting Started

  1. Pre-requisites
  1. Install Templates
$ dotnet new -i NApi.Template
  1. Create Project
$ mkdir foo && cd foo
$ dotnet new nodejs
  1. Build
$ dotnet build
  1. Test Your Module
$ node
> require("./bin/Debug/net6.0/osx-x64/publish/module.node")

PS: Replace osx-x64 with your operating system

Limitations

[TODO] CoreCLR Mode: No above limitations, but it depends on .NET installation at runtime

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages