Skip to main content

ZenTS DocsV8 / HostJs

TypeScript / JavaScript · Lazy CLR binding · V8 and platform VMs

Mono · EditorIl2Cpp · Player

Unity 2022.3.x and later LTS · Tuanjie · Win64 / macOS / iOS / Android / WebGL / WeChat

⚡

On-demand CLR binding

CSharp / csharp: lazy binding and shared calling bridges with consistent overload and marshaling rules; no business-maintained per-type Wrap allowlist.

🟦

TypeScript and debugging

TsProject checks, emit, CLR declarations, and source maps, with built-in V8 Inspector in the Editor.

📦

Native V8 and HostJs

Official static V8 on native platforms; platform VMs on WebGL/WeChat. Library SDKs support read-only Git packages.

Bidirectional calls at a glance

// Bootstrap
JsAppDomain.Initialize(JsFileModuleLoader.Load);

void Start()
{
    var add = JsAppDomain.GetFunction<Func<int, int, int>>("app", "add");
    Debug.Log(add(10, 20)); // 30
}
// TsProject/out/app.js  (canonical: "app")
export function add(a, b) {
  return a + b;
}