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:
@@ -0,0 +1,23 @@
|
||||
# C-friendly wrappers around Clojure-generated code
|
||||
# Exports plain C types (int, char*) instead of CljVal
|
||||
|
||||
import cljnim_runtime
|
||||
|
||||
# Import the generated Clojure functions
|
||||
include build/math
|
||||
|
||||
proc c_square*(x: cint): cint {.exportc, dynlib.} =
|
||||
let r = square(cljInt(x.int64))
|
||||
return r.intVal.cint
|
||||
|
||||
proc c_factorial*(n: cint): cint {.exportc, dynlib.} =
|
||||
let r = factorial(cljInt(n.int64))
|
||||
return r.intVal.cint
|
||||
|
||||
proc c_add*(a, b: cint): cint {.exportc, dynlib.} =
|
||||
let r = add(cljInt(a.int64), cljInt(b.int64))
|
||||
return r.intVal.cint
|
||||
|
||||
proc c_greet*(name: cstring): cstring {.exportc, dynlib.} =
|
||||
let r = greet(cljString($name))
|
||||
return r.strVal.cstring
|
||||
Reference in New Issue
Block a user