EdgeJs 20.12.3
dotnet add package EdgeJs --version 20.12.3
NuGet\Install-Package EdgeJs -Version 20.12.3
<PackageReference Include="EdgeJs" Version="20.12.3" />
paket add EdgeJs --version 20.12.3
#r "nuget: EdgeJs, 20.12.3"
// Install EdgeJs as a Cake Addin #addin nuget:?package=EdgeJs&version=20.12.3 // Install EdgeJs as a Cake Tool #tool nuget:?package=EdgeJs&version=20.12.3
About
With Edge.js you can script Node.js in a .NET and .NET in Node.js.
Edge.js allows you to run Node.js and .NET code in one process. You can call Node.js functions from .NET and .NET functions from Node.js.
Edge.js takes care of marshaling data between CLR and V8. Edge.js also reconciles threading models of single-threaded V8 and multi-threaded CLR. Edge.js ensures correct lifetime of objects on V8 and CLR heaps.
Script CLR from Node.Js on Windows/Linux/macOS with .NET Framework, .Net Core and .NET Standard.
NOTE Scripting Node.Js from CLR is only supported on Windows .NET Framework 4.5
More documentation is available at Edge.Js GitHub page.
NuGet package compiled using Node.js v20.12.2.
How to use
using System;
using System.Threading.Tasks;
using EdgeJs;
class Program
{
public static async Task Start()
{
var func = Edge.Func(@"
return function (data, callback) {
callback(null, 'Node.js welcomes ' + data);
}
");
Console.WriteLine(await func(".NET"));
}
static void Main(string[] args)
{
Start().Wait();
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net45 is compatible. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.5
- No dependencies.
-
.NETFramework 4.6.2
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.