# tencent/puerts

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/tencent-puerts).**

6,103 stars · 845 forks · C++ · NOASSERTION

## Links

- GitHub: https://github.com/Tencent/puerts
- awesome-repositories: https://awesome-repositories.com/repository/tencent-puerts.md

## Topics

`dotnet` `javascript` `nodejs` `quickjs` `typescript` `unity` `unrealengine` `v8`

## Description

Puerts is a TypeScript runtime embedder and game engine scripting framework designed to integrate dynamic languages into low-level host applications. It functions as a high-performance cross-language API bridge, allowing developers to execute gameplay logic and editor scripts using TypeScript and JavaScript within a compiled host environment.

The project distinguishes itself through a unified bridging API that supports pluggable scripting backends, enabling the selection or hot-swapping of different language engines to balance execution speed against binary size. It provides automated type declaration generation to ensure type-safe access and autocomplete for native host APIs.

The framework covers a broad capability surface including reflection-based API bridging for native function invocation, cross-language object mapping, and the integration of third-party packages. It also supports advanced automation through natural language engine control, AI agent integration for dynamic behaviors, and a standardized remote control protocol for connecting external AI coding tools to a running project.

## Tags

### Programming Languages & Runtimes

- [JavaScript Engine Embedding](https://awesome-repositories.com/f/programming-languages-runtimes/c-library-embedding/runtime-embedding/webassembly-engine-embedding/javascript-engine-embedding.md) — Integrates a JavaScript and TypeScript execution engine directly into low-level host applications.
- [Cross-Language Bridges](https://awesome-repositories.com/f/programming-languages-runtimes/cross-language-bridges.md) — Functions as a high-performance cross-language bridge for invoking native engine functions from a scripting environment.
- [Scripting and Compiled Language Integration](https://awesome-repositories.com/f/programming-languages-runtimes/cross-language-logic-implementations/scripting-and-compiled-language-integration.md) — Integrates dynamic languages into applications to develop logic outside of the primary compiled language. ([source](https://github.com/tencent/puerts#readme))
- [Host API Bridging](https://awesome-repositories.com/f/programming-languages-runtimes/host-api-bridging.md) — Establishes high-performance communication between script runtimes and host APIs written in low-level languages for efficient data exchange. ([source](https://github.com/tencent/puerts#readme))
- [Multi-Language Runtime Embeddings](https://awesome-repositories.com/f/programming-languages-runtimes/multi-language-runtime-embeddings.md) — Integrates various dynamic scripting engines into a host application to handle logic outside of compiled code.
- [Reflection-Based API Bridging](https://awesome-repositories.com/f/programming-languages-runtimes/reflection-based-api-bridging.md) — Maps native host functions to a scripting environment using reflection and static wrappers for high-performance cross-language calls.
- [TypeScript Runtime Embedders](https://awesome-repositories.com/f/programming-languages-runtimes/typescript-runtime-embedders.md) — Provides a system for integrating a JavaScript and TypeScript execution engine into low-level host applications.
- [Multi-Language Script Execution](https://awesome-repositories.com/f/programming-languages-runtimes/multi-language-script-execution.md) — Executes logic using various scripting languages by embedding a compatible script engine into the host application. ([source](https://github.com/tencent/puerts#readme))

### Game Development

- [Game Logic Scripting](https://awesome-repositories.com/f/game-development/game-logic-scripting.md) — Provides a framework for developing game logic and autonomous agents using a type-safe scripting language.
- [Scripted Logic Systems](https://awesome-repositories.com/f/game-development/scripted-logic-systems.md) — Uses dynamic languages within a host environment to handle logic development outside of the native compiled code. ([source](https://github.com/tencent/puerts#readme))
- [TypeScript](https://awesome-repositories.com/f/game-development/typescript.md) — Enables writing gameplay logic and scripts for Unity or Unreal Engine using TypeScript.
- [TypeScript Game Engine Integrations](https://awesome-repositories.com/f/game-development/typescript-game-engine-integrations.md) — Embeds a TypeScript runtime into game engines to execute gameplay logic and editor scripts.
- [Embedded Gameplay AI Agents](https://awesome-repositories.com/f/game-development/embedded-gameplay-ai-agents.md) — Integrates autonomous agents into the project runtime to create dynamic characters that perceive game state and execute actions. ([source](https://github.com/tencent/puerts#readme))
- [Embedded Runtime AI Agents](https://awesome-repositories.com/f/game-development/embedded-runtime-ai-agents.md) — Inserts autonomous agents into a live project environment to create dynamic behaviors and gameplay logic based on real-time state. ([source](https://github.com/tencent/puerts#readme))
- [Natural Language Editor Control](https://awesome-repositories.com/f/game-development/natural-language-editor-control.md) — Executes commands and manipulates scene objects using AI-generated scripts that access the editor API via natural language prompts. ([source](https://github.com/tencent/puerts#readme))
- [Natural Language Engine Control](https://awesome-repositories.com/f/game-development/natural-language-engine-control.md) — Allows the project to execute engine API calls through an AI assistant to automate scene building and object inspection. ([source](https://github.com/tencent/puerts#readme))

### Operating Systems & Systems Programming

- [Native Game Function Invocations](https://awesome-repositories.com/f/operating-systems-systems-programming/native-function-invocations/native-game-function-invocations.md) — Invokes native functions and manages objects across different languages using reflection or static wrappers for high execution speed. ([source](https://github.com/tencent/puerts#readme))

### Software Engineering & Architecture

- [Cross-Language Object Mapping](https://awesome-repositories.com/f/software-engineering-architecture/cross-language-object-mapping.md) — Manages the lifecycle and access of native host objects within a managed scripting environment using a unified bridge.
- [Scripting Backend Swapping](https://awesome-repositories.com/f/software-engineering-architecture/pluggable-backends/scripting-backend-swapping.md) — Allows swapping different language engine implementations to trade off between execution speed and final binary size.
- [Type Definition Generators](https://awesome-repositories.com/f/software-engineering-architecture/type-definition-generators.md) — Automatically generates TypeScript declaration files to provide type-safe access and autocomplete for native host APIs. ([source](https://github.com/tencent/puerts#readme))
- [Automated Type Generation](https://awesome-repositories.com/f/software-engineering-architecture/type-safe-development/automated-type-generation.md) — Automatically produces TypeScript declaration files from native host APIs to provide static type checking and autocomplete.
- [Unified Bridge APIs](https://awesome-repositories.com/f/software-engineering-architecture/architectural-design-patterns/asynchronous-execution/script-execution-bridges/unified-bridge-apis.md) — Provides a unified bridging API to embed various dynamic languages into a host engine for logic development. ([source](https://github.com/tencent/puerts#readme))

### Artificial Intelligence & ML

- [External API Tool Exposures](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-agent-integrations/ai-agent-tool-integrations/external-api-tool-exposures.md) — Exposes internal state and functions as callable tools for external AI coding tools via a standardized protocol. ([source](https://github.com/tencent/puerts#readme))
- [Gameplay](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-agent-integrations/gameplay.md) — Integrates autonomous AI agents into game environments to create dynamic behaviors based on real-time state.
- [External Tool Integrations](https://awesome-repositories.com/f/artificial-intelligence-ml/external-service-integrations/external-knowledge-integrators/external-tool-integrations.md) — Connects external AI editors and clients to the project via a standardized protocol to access core capabilities. ([source](https://github.com/tencent/puerts#readme))

### Data & Databases

- [Scripting Engine Selection](https://awesome-repositories.com/f/data-databases/collective-communication-operations/scripting-engine-selection.md) — Allows choosing between different engine implementations to balance execution performance against the final binary code size. ([source](https://github.com/tencent/puerts#readme))
- [Scripting Runtime Hot-Swapping](https://awesome-repositories.com/f/data-databases/table-indexing-systems/search-backends/scripting-runtime-hot-swapping.md) — Swaps between different language runtimes to balance execution speed, binary size, and specific functional requirements. ([source](https://github.com/tencent/puerts#readme))

### Development Tools & Productivity

- [Natural Language Editor Automation](https://awesome-repositories.com/f/development-tools-productivity/game-editor-extensions/natural-language-editor-automation.md) — Allows for automated scene building and object inspection in game editors using natural language and scripts.

### Networking & Communication

- [Remote Control Protocols](https://awesome-repositories.com/f/networking-communication/remote-control-protocols.md) — Exposes internal engine state and APIs to external tools via a communication layer for remote manipulation and verification.
