IMX Compiler (imxc)
raw JSON → 0.6.13 verified Fri May 01 auth: no javascript
imxc is a compiler that transforms React-like TypeScript/JSX (.tsx) into native C++ code using Dear ImGui. Version 0.6.13 is stable; releases are on-demand. It offers a CLI for scaffolding projects, watching files, and generating code. Key differentiators include tight integration with Dear ImGui, a 5-prop theme system, support for custom C++ widgets, and TypeScript type checking via .d.ts files. It requires Node.js, CMake 3.25+, and a C++20 compiler.
Common errors
error error: 'imxc' is not recognized as an internal or external command ↓
cause imxc not installed globally or not in PATH.
fix
Run: npx imxc instead, or install globally: npm install -g imxc
error CMake Error: cmake version 3.20 is too old; need 3.25 or later. ↓
cause Incompatible CMake version.
fix
Download and install CMake 3.25 or later from https://cmake.org/download/
error error: 'imx' is not a valid namespace or class ↓
cause Generated C++ code may be missing header includes or wrong compilation target.
fix
Ensure you ran cmake correctly; check your CMakeLists.txt for proper IMX integration.
Warnings
gotcha CLI tool must be run via npx or installed globally. Direct 'imxc' command may not work if not in PATH. ↓
fix Use npx imxc or install globally with npm install -g imxc.
breaking TypeScript 'number' props always generate C++ 'float'. Use integer types via custom declarations. ↓
fix Declare custom native widgets in src/imx.d.ts to specify exact C++ types.
gotcha File structure: 'src/App.tsx' is treated as the default entrypoint; incorrect file names may break auto-detection. ↓
fix Name your entry file 'App.tsx' inside the 'src' folder, or specify it explicitly with --entry.
gotcha CMake 3.25+ and C++20 compiler are required; older versions or compilers will fail. ↓
fix Update CMake to 3.25+ and ensure your compiler supports C++20 (e.g., GCC 11+, Clang 14+, MSVC 2022).
Install
npm install imxc yarn add imxc pnpm add imxc Quickstart
npx imxc init myapp --template=minimal && cd myapp && cmake -B build && cmake --build build --config Release