Skip to content

Symbol Generator (lux dict gen)

riteshrajas edited this page Aug 31, 2026 · 1 revision

Symbol Generator (lux-dict-gen)

Compile-time symbol dictionary extractor CLI tool for Pyintel Lux.


1. Overview

To maintain zero runtime string formatting overhead on constrained microcontrollers, Pyintel Lux uses compile-time symbol tokenization. lux-dict-gen scans C/C++ or Rust source files, extracts telemetry logging macro definitions or symbol IDs, and generates a host-side symbols.json dictionary mapping 16-bit integers to string names, payload types, and source locations.


2. Generated symbols.json Schema

{
  "version": "0.1.0",
  "generated_at": "2026-08-30T19:00:00Z",
  "symbols": [
    {
      "id": 256,
      "name": "APP_MOTOR_OVERTEMP",
      "payload_type": "u32",
      "description": "Motor temperature exceeded operating threshold",
      "source_file": "src/motor.cpp",
      "source_line": 42
    },
    {
      "id": 257,
      "name": "SENSOR_BATTERY_VOLTAGE",
      "payload_type": "f32",
      "description": "Battery voltage reading (Volts)",
      "source_file": "src/power.cpp",
      "source_line": 88
    }
  ]
}

Clone this wiki locally