ba0b300917
- New TUI screens: Main Menu, Compile, Run, REPL, AI Generator, AI Settings, Help - AI configuration persisted in ~/.config/cljnim/config.json - Added illwill dependency for terminal UI - Updated experiments, examples, docs, and core modules
Clojure/Nim → JavaScript
Compile Clojure code to JavaScript via Nim's JS backend.
Why?
- No JVM — Clojure in the browser without 50MB runtime
- No JavaScript — write Clojure, get JS
- Smaller than ClojureScript — no Google Closure compiler needed
Quick Start
./build.sh
Then open www/index.html in a browser.
How it works
cljnim compile-lib— generates Nim with exported functionsjs_wrappers.nim— thin wrappers that convert CljVal ↔ JS typesnim js— compiles Nim to JavaScript- Browser loads
math.jsand callsjsSquare(7),jsFactorial(5), etc.
Limitations
- Full
cljnim_runtime.nimuses C FFI (threads, processes) — not JS-compatible - For now, only numeric and string functions work
- Persistent data structures need JS-specific runtime
Future
- Full JS runtime for HAMT vectors/maps
- DOM interop:
(dom/getElementById "app") - npm package output