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,11 @@
|
||||
CC = gcc
|
||||
CFLAGS = -I../build -L../build
|
||||
LDFLAGS = -lmath -Wl,-rpath,'$$ORIGIN/../build'
|
||||
|
||||
all: test_client
|
||||
|
||||
test_client: main.c
|
||||
$(CC) $(CFLAGS) main.c $(LDFLAGS) -o test_client
|
||||
|
||||
clean:
|
||||
rm -f test_client
|
||||
@@ -0,0 +1,24 @@
|
||||
#include <stdio.h>
|
||||
|
||||
// Declarations from the shared library
|
||||
extern int c_square(int x);
|
||||
extern int c_factorial(int n);
|
||||
extern int c_add(int a, int b);
|
||||
extern const char* c_greet(const char* name);
|
||||
|
||||
// Nim runtime init
|
||||
extern void NimMain(void);
|
||||
|
||||
int main(void) {
|
||||
NimMain();
|
||||
|
||||
printf("=== Clojure/Nim Native Library Test ===\n\n");
|
||||
|
||||
printf("c_square(7) = %d\n", c_square(7));
|
||||
printf("c_add(10, 20) = %d\n", c_add(10, 20));
|
||||
printf("c_factorial(5) = %d\n", c_factorial(5));
|
||||
printf("c_greet(\"World\") = %s\n", c_greet("World"));
|
||||
|
||||
printf("\nAll tests passed! Clojure in a .so file.\n");
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user