KRYONOS

JavaScript API Reference

Comprehensive technical reference for the embedded Duktape JavaScript runtime, hardware peripherals, 3D graphics, and networking in KryonOS.

KryonOS JavaScript API Reference

KryonOS embeds a lightweight, high-efficiency Duktape 2.7 JavaScript Virtual Machine executing natively on ESP32 microcontrollers. User-space applications and background services are written in JavaScript with direct access to hardware-accelerated graphics, file systems, cryptographic engines, peripheral buses, and wireless network sockets.

For complete firmware source code, drivers, and release binaries, visit the official KryonOS GitHub Repository.


Runtime Specifications

AttributeSpecificationNotes
Engine CoreDuktape v2.7.0 Embedded EngineNative C++ stack machine compilation
ECMAScript StandardES5 / ES5.1 CompletePartial ES6 (TypedArray, Promise, Proxy)
API LevelLevel 3 (KryonOS v3.0.0+)Hardware-accelerated kernel bindings
Memory Allocation~90 KB usable heap per appAutomatic mark-and-sweep garbage collection
Execution ModelSingle-threaded event loopCooperative multitasking with FreeRTOS kernel

API Module Index

Explore the specialized API modules categorized below:

Cpu

Engine Specs & ES5 Compliance

Duktape execution model, memory budget, garbage collection cycles, and ES5 compatibility rules.

Terminal

System & OS Core

Display bounds, CPU diagnostics, uptime, touch coordinates, virtual keyboard, and reboot utilities.

FolderTree

Unified File System (FS)

Transparent file I/O routed between internal SPIFFS/LittleFS flash (/local/) and SD storage (/sd/).

Monitor

2D Display & Sprites

16-bit RGB565 color pack, direct-to-glass primitives, BMP streaming, and off-screen double buffers.

Box

Kryon3D Hardware Engine

Hardware-accelerated 3D rasterization, camera matrices, directional lighting, fog, and mesh batching.

Zap

GPIO & Analog I/O

Digital pin switching, 12-bit ADC analog conversion, and microsecond pulse measurement.

Activity

Hardware PWM & Servos

16-bit hardware pulse-width modulation, 0-180 degree servo control, and frequency tone generation.

Binary

I2C TwoWire Bus & Sensors

I2C master bus scanning, byte and buffer register read/write operations for external peripherals.

Globe

REST Client & Wi-Fi

Wi-Fi link status, signal RSSI, HTTP/HTTPS GET/POST client, and direct flash file downloaders.

Radio

WebSocket Client

Full-duplex real-time communication, automated heartbeats, and binary payload transfer.

Server

Embedded HTTP Web Server

Host local web interfaces, serve static HTML/JS from flash or SD, and process REST JSON endpoints.

Calculator

FastMath & Matrix Acceleration

Lookup-table trigonometry, hardware TRNG entropy, 3D vector maths, and 4x4 matrix batch processing.

Shield

Hardware Cryptography

Hardware-accelerated SHA-256, HMAC authentication, and AES-128/256-CBC encryption routines.

Bell

Inter-App IPC & Notifications

Inter-process message broker, intent dispatching, and non-blocking floating system toast alerts.

Sparkles

KryonOS Cloud & AI Engine

Device cloud synchronization, fleet management telemetry, and on-device AI inference assistants.

On this page