{"id":25755,"library":"imxc","title":"IMX Compiler (imxc)","description":"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.","status":"active","version":"0.6.13","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","imgui","react","tsx","native","gui","compiler","codegen"],"install":[{"cmd":"npm install imxc","lang":"bash","label":"npm"},{"cmd":"yarn add imxc","lang":"bash","label":"yarn"},{"cmd":"pnpm add imxc","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Type checking and parsing of TSX files; used at compile time.","package":"typescript","optional":false},{"reason":"Required to build the generated C++ code into executables.","package":"cmake","optional":false}],"imports":[],"quickstart":{"code":"npx imxc init myapp --template=minimal && cd myapp && cmake -B build && cmake --build build --config Release","lang":"javascript","description":"Scaffolds a minimal IMX project, compiles TSX to C++, and builds the native app using CMake."},"warnings":[{"fix":"Use npx imxc or install globally with npm install -g imxc.","message":"CLI tool must be run via npx or installed globally. Direct 'imxc' command may not work if not in PATH.","severity":"gotcha","affected_versions":"*"},{"fix":"Declare custom native widgets in src/imx.d.ts to specify exact C++ types.","message":"TypeScript 'number' props always generate C++ 'float'. Use integer types via custom declarations.","severity":"breaking","affected_versions":"<1.0"},{"fix":"Name your entry file 'App.tsx' inside the 'src' folder, or specify it explicitly with --entry.","message":"File structure: 'src/App.tsx' is treated as the default entrypoint; incorrect file names may break auto-detection.","severity":"gotcha","affected_versions":"*"},{"fix":"Update CMake to 3.25+ and ensure your compiler supports C++20 (e.g., GCC 11+, Clang 14+, MSVC 2022).","message":"CMake 3.25+ and C++20 compiler are required; older versions or compilers will fail.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run: npx imxc instead, or install globally: npm install -g imxc","cause":"imxc not installed globally or not in PATH.","error":"error: 'imxc' is not recognized as an internal or external command"},{"fix":"Download and install CMake 3.25 or later from https://cmake.org/download/","cause":"Incompatible CMake version.","error":"CMake Error: cmake version 3.20 is too old; need 3.25 or later."},{"fix":"Ensure you ran cmake correctly; check your CMakeLists.txt for proper IMX integration.","cause":"Generated C++ code may be missing header includes or wrong compilation target.","error":"error: 'imx' is not a valid namespace or class"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}