JS Runtime

[中文]

Overview

brookesia_runtime_js runs JavaScript runtime apps through the Brookesia native bridge.

Core Responsibilities

  • Registers native modules as JavaScript globals.

  • Supports synchronous and asynchronous service bridge functions.

  • Uses ES module app entry files in packaged runtime apps.

Integration Position

This component is an independent ESP-Brookesia release component. It can be integrated through ESP-IDF component dependencies and combined with peer framework components as needed.

API Reference

Header File

Classes

class Backend : public esp_brookesia::runtime::IRuntimeBackend

JavaScript runtime backend registered with the runtime manager.

Public Static Functions

static inline Backend &get_instance()

Get the singleton JavaScript backend instance.

Returns

JavaScript backend singleton.