feat: add fullscreen TUI and project updates

- 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
This commit is contained in:
2026-05-09 01:53:23 +03:00
parent 2bc64eca22
commit ba0b300917
42 changed files with 3042 additions and 153 deletions
+36
View File
@@ -0,0 +1,36 @@
# 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
```bash
./build.sh
```
Then open `www/index.html` in a browser.
## How it works
1. `cljnim compile-lib` — generates Nim with exported functions
2. `js_wrappers.nim` — thin wrappers that convert CljVal ↔ JS types
3. `nim js` — compiles Nim to JavaScript
4. Browser loads `math.js` and calls `jsSquare(7)`, `jsFactorial(5)`, etc.
## Limitations
- Full `cljnim_runtime.nim` uses 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