Puerts.Core.Complete 3.0.2

Prefix Reserved
dotnet add package Puerts.Core.Complete --version 3.0.2
                    
NuGet\Install-Package Puerts.Core.Complete -Version 3.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Puerts.Core.Complete" Version="3.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Puerts.Core.Complete" Version="3.0.2" />
                    
Directory.Packages.props
<PackageReference Include="Puerts.Core.Complete" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Puerts.Core.Complete --version 3.0.2
                    
#r "nuget: Puerts.Core.Complete, 3.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Puerts.Core.Complete@3.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Puerts.Core.Complete&version=3.0.2
                    
Install as a Cake Addin
#tool nuget:?package=Puerts.Core.Complete&version=3.0.2
                    
Install as a Cake Tool

PuerTS — JavaScript/TypeScript for .NET

license Puerts.V8.Complete Puerts.NodeJS.Complete Puerts.QuickJS.Complete

PuerTS is a scripting solution that brings JavaScript / TypeScript to your .NET applications. It provides high-performance script runtimes with seamless C# interop.

Features

  • 🚀 High Performance — Execute JavaScript/TypeScript with V8, Node.js, or QuickJS engines.
  • 🔗 Seamless C# Interop — Call any .NET type directly from JavaScript, and invoke JS functions from C#.
  • 📝 TypeScript Support — Type-safe scripting with full TypeScript declaration generation.
  • 🌍 Cross-Platform — Supports Windows, macOS, and Linux.

JavaScript Backend Comparison

Backend Node API Performance Binary Size Debugging
V8 ★★★★★ ★★★ ✔️
QuickJS ★★
Node.js ✔️ ★★★★★ ★★★★★ ✔️
  • V8 (recommended): Best overall performance, moderate binary size, ECMAScript spec only.
  • QuickJS: Smallest binary size, suitable for size-sensitive scenarios.
  • Node.js: Full Node.js API support, largest binary size.

Installation

Install via NuGet. Choose one of the following Complete packages (includes core + native assets for all desktop platforms):

# V8 backend (recommended)
dotnet add package Puerts.V8.Complete

# Or Node.js backend (with Node API support)
dotnet add package Puerts.NodeJS.Complete

# Or QuickJS backend (minimal size)
dotnet add package Puerts.QuickJS.Complete

Or install components separately for finer control:

# Core library (required)
dotnet add package Puerts.Core

# Backend (choose one)
dotnet add package Puerts.V8
dotnet add package Puerts.NodeJS
dotnet add package Puerts.QuickJS

# Native assets per platform (choose what you need)
dotnet add package Puerts.V8.NativeAssets.Win32
dotnet add package Puerts.V8.NativeAssets.Linux
dotnet add package Puerts.V8.NativeAssets.macOS

Supported Platforms

.net8.0+, .netstandard2.1

Windows (x64) Linux (x64) macOS (Universal)
V8 ✔️ ✔️ ✔️
Node.js ✔️ ✔️ ✔️
QuickJS ✔️ ✔️ ✔️

Note: AOT compilation is not currently supported.

Quick Start

Create a ScriptEnv with the backend matching your installed package:

Installed Package Backend Class
Puerts.V8 / Puerts.V8.Complete new BackendV8()
Puerts.NodeJS / Puerts.NodeJS.Complete new BackendNodeJS()
Puerts.QuickJS / Puerts.QuickJS.Complete new BackendQuickJS()
using Puerts;

// Use the backend that matches your installed package:
//   V8      → new BackendV8()
//   Node.js → new BackendNodeJS()
//   QuickJS → new BackendQuickJS()
var env = new ScriptEnv(new BackendV8());

// Execute JavaScript
env.Eval(@"
    const Console = CS.System.Console;
    Console.WriteLine('Hello from JavaScript!');
");

// Eval with return value
int result = env.Eval<int>("1 + 2");
Console.WriteLine($"JS result: {result}"); // output: 3

env.Dispose();

Calling C# from JavaScript

Access any .NET type via the CS namespace:

// Access C# types
const Console = CS.System.Console;
const DateTime = CS.System.DateTime;
const List = CS.System.Collections.Generic.List$1(CS.System.String);

// Create instances and call methods
let now = DateTime.Now;
Console.WriteLine('Current time: ' + now.ToString());

let list = new List();
list.Add('hello');
list.Add('world');
Console.WriteLine('Count: ' + list.Count);

Calling JavaScript from C#

using Puerts;
using System;

// Use the backend that matches your installed package
var env = new ScriptEnv(new BackendV8());

// Get a JS function as a C# delegate
var add = env.Eval<Func<int, int, int>>("(a, b) => a + b");
Console.WriteLine(add(10, 20)); // output: 30

// Get a JS action
var greet = env.Eval<Action<string>>(@"
    (name) => {
        const Console = CS.System.Console;
        Console.WriteLine('Hello, ' + name + '!');
    }
");
greet("PuerTS");

env.Dispose();

Documentation

For full documentation, tutorials and API reference, visit: https://puerts.github.io/en

License

BSD 3-Clause

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on Puerts.Core.Complete:

Package Downloads
Puerts.Lua.Complete

Puerts is a library that makes it easy to add scripting to your .NET applications. It currently supports JavaScript (via V8/Nodejs/Quickjs) and Lua.

Puerts.V8.Complete

Puerts is a library that makes it easy to add scripting to your .NET applications. It currently supports JavaScript (via V8/Nodejs/Quickjs) and Lua.

Puerts.Python.Complete

Puerts is a library that makes it easy to add scripting to your .NET applications. It currently supports JavaScript (via V8/Nodejs/Quickjs) and Lua.

Puerts.QuickJS.Complete

Puerts is a library that makes it easy to add scripting to your .NET applications. It currently supports JavaScript (via V8/Nodejs/Quickjs) and Lua.

Puerts.NodeJS.Complete

Puerts is a library that makes it easy to add scripting to your .NET applications. It currently supports JavaScript (via V8/Nodejs/Quickjs) and Lua.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.2 275 4/2/2026
3.0.1 311 3/4/2026
3.0.0 555 12/15/2025