Puerts.QuickJS 3.0.1

Prefix Reserved
dotnet add package Puerts.QuickJS --version 3.0.1
                    
NuGet\Install-Package Puerts.QuickJS -Version 3.0.1
                    
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.QuickJS" Version="3.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Puerts.QuickJS" Version="3.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Puerts.QuickJS" />
                    
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.QuickJS --version 3.0.1
                    
#r "nuget: Puerts.QuickJS, 3.0.1"
                    
#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.QuickJS@3.0.1
                    
#: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.QuickJS&version=3.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Puerts.QuickJS&version=3.0.1
                    
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

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Puerts.QuickJS:

Package Downloads
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.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.1 120 3/4/2026
3.0.0 424 12/8/2025
3.0.0-alpha4 290 8/6/2025
3.0.0-alpha3 276 8/5/2025
3.0.0-alpha2 260 8/5/2025