chore: rebrand Clojure/Nim → Bara Lang across codebase
- Bulk replace Clojure/Nim → Bara Lang in src/, lib/, examples/, benchmarks/, experiments/, books/, LICENSE, cljnim.nimble, PLAN.md, AI_AGENT.md - Rename book chapters: 05-clojure-nim.md → 05-bara-lang.md (en + bg) - Update all chapter index links and anchors - Replace project-specific 'Clojure' references with 'Bara Lang' in experiments/, src/ai_assist.nim, src/tui_screens.nim, src/emitter.nim, src/reader.nim, src/types.nim, lib/cljnim_runtime*.nim - Keep legitimate JVM Clojure/ClojureScript/Clojure CLR references intact
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Clojure/Nim → WASM (via Emscripten)
|
||||
# Bara Lang → WASM (via Emscripten)
|
||||
|
||||
Compile Clojure code to WebAssembly using Nim's Emscripten backend.
|
||||
Compile Bara Lang code to WebAssembly using Nim's Emscripten backend.
|
||||
|
||||
## Why?
|
||||
|
||||
@@ -31,7 +31,7 @@ Then open `www/index.html` in a browser.
|
||||
1. `cljnim compile-lib` — generates Nim with exported functions
|
||||
2. `nim c -d:emscripten` — compiles Nim to WASM + JS glue
|
||||
3. Browser loads `math.js` (glue) + `math.wasm` (WASM module)
|
||||
4. JS calls `_wasmSquare(7)` → WASM executes native Clojure code
|
||||
4. JS calls `_wasmSquare(7)` → WASM executes native Bara Lang code
|
||||
|
||||
## Future
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# WASM-friendly wrappers around Clojure-generated code
|
||||
# WASM-friendly wrappers around Bara Lang-generated code
|
||||
# Uses Emscripten FFI: cint → JS number, cstring → JS string
|
||||
|
||||
import cljnim_runtime
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Clojure/Nim → WASM Demo</title>
|
||||
<title>Bara Lang → WASM Demo</title>
|
||||
<style>
|
||||
body { font-family: monospace; max-width: 800px; margin: 40px auto; padding: 20px; background: #1a1a2e; color: #eee; }
|
||||
h1 { color: #e94560; }
|
||||
@@ -10,8 +10,8 @@
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>⚡ Clojure/Nim → WASM (Emscripten)</h1>
|
||||
<p>Clojure compiled to Nim, then to WebAssembly via Emscripten.</p>
|
||||
<h1>⚡ Bara Lang → WASM (Emscripten)</h1>
|
||||
<p>Bara Lang compiled to Nim, then to WebAssembly via Emscripten.</p>
|
||||
|
||||
<div class="result">
|
||||
<div id="output">Loading WASM module...</div>
|
||||
@@ -25,7 +25,7 @@
|
||||
<b>wasmSquare(7)</b> = ${Module._wasmSquare(7)}<br>
|
||||
<b>wasmFactorial(5)</b> = ${Module._wasmFactorial(5)}<br>
|
||||
<br>
|
||||
<i>Clojure running at native speed in your browser!</i>
|
||||
<i>Bara Lang running at native speed in your browser!</i>
|
||||
`;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user