Commit 1d4fc88
committed
Initial commit: React runtime for Dear ImGui with Static Hermes
A React runtime that renders to Dear ImGui using Static Hermes, demonstrating
seamless JavaScript and C++ ecosystem integration with zero-cost FFI.
Features:
- React 19.2.0 with custom reconciler and full hooks support
- Native Dear ImGui components (window, button, table, drawing primitives, etc.)
- Three-unit architecture separating event loop, React logic, and ImGui rendering
- Event loop with setTimeout, setImmediate, and Promise support
- Controlled/uncontrolled window positioning patterns
- Dynamic window creation and destruction
- Custom drawing with shapes (rectangles, circles)
- Live-updating tables
Implementation:
- JavaScript-first: ~2,400 lines of hand-written JS, ~700 lines of C++ glue
- ~12,000 lines of auto-generated typed JavaScript FFI bindings
- Typed mode for ImGui FFI (zero-cost calls to C functions)
- Untyped mode for React runtime and application code
- Three compilation modes: native code, bytecode, or source
- Automatic Static Hermes build integration via CMake
- Simple 5-line CMake function for creating new apps
Examples:
- hello: Minimal Hello World demo
- showcase: Full feature demo with multiple windows, state, animations
- dynamic-windows: Dynamic window lifecycle management
Platform support: macOS (tested), Linux (expected), Windows (coming soon)
Built by the architect of Hermes with extensive assistance from Claude Code
for JavaScript implementation, React reconciler architecture, and modern
tooling (esbuild, npm, CMake integration).
This is an experimental project demonstrating Static Hermes capabilities.
Contributions welcome!0 parents commit 1d4fc88
File tree
272 files changed
+274898
-0
lines changed- cmake
- doc
- examples
- dynamic-windows
- hello
- showcase
- external
- cimgui
- imgui
- sokol
- soloud
- contrib
- cmake
- include
- scripts
- src
- audiosource
- ay
- monotone
- noise
- openmpt
- sfxr
- speech
- tedsid
- vic
- vizsn
- wav
- backend
- alsa
- coreaudio
- jack
- miniaudio
- nosound
- null
- openal
- opensles
- oss
- portaudio
- sdl2_static
- sdl_static
- sdl
- vita_homebrew
- wasapi
- winmm
- xaudio2
- c_api
- core
- filter
- tools
- codegen
- lutgen
- resamplerlab
- sanity
- stb
- lib
- imgui-runtime
- imgui-unit
- jslib-unit
- react-imgui-reconciler
- media
- scripts
- tools
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
272 files changed
+274898
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
0 commit comments