{"id":50309448,"url":"https://github.com/bmorphism/nanoclj-zig","last_synced_at":"2026-05-28T19:30:39.545Z","repository":{"id":353699323,"uuid":"1214612223","full_name":"bmorphism/nanoclj-zig","owner":"bmorphism","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-07T20:12:15.000Z","size":23937,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-07T22:14:45.044Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bmorphism.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-18T20:11:35.000Z","updated_at":"2026-04-25T07:29:19.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/bmorphism/nanoclj-zig","commit_stats":null,"previous_names":["bmorphism/nanoclj-zig"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bmorphism/nanoclj-zig","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmorphism%2Fnanoclj-zig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmorphism%2Fnanoclj-zig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmorphism%2Fnanoclj-zig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmorphism%2Fnanoclj-zig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bmorphism","download_url":"https://codeload.github.com/bmorphism/nanoclj-zig/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmorphism%2Fnanoclj-zig/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33624202,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-28T19:30:38.809Z","updated_at":"2026-05-28T19:30:39.535Z","avatar_url":"https://github.com/bmorphism.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nanoclj-zig\n\nA Clojure interpreter in Zig. Single static binary. Zig 0.16.0 stdlib is the only runtime dependency.\n\n## Install\n\nRequires [Zig 0.16.0](https://ziglang.org/download/).\n\n```sh\ngit clone https://github.com/plurigrid/nanoclj-zig\ncd nanoclj-zig\nzig build run                         # interactive REPL\nzig build -Doptimize=ReleaseFast run  # optimized\nzig build test                        # unit tests\n```\n\n## Use\n\n```\n$ zig build run\nbob=\u003e (+ 1 2)\n3\n\nbob=\u003e (map (fn* [x] (* x x)) [1 2 3 4 5])\n(1 4 9 16 25)\n\nbob=\u003e (run* [q] (fresh [x y] (== x :hello) (== y :world) (== q [x y])))\n([:hello :world])\n```\n\nClojure forms: `def`, `fn*`, `let*`, `if`, `do`, `quote`, `loop`/`recur`, `defmacro`, `try`/`catch`, `defmulti`/`defmethod`, `defprotocol`/`deftype`, `binding`, `with-redefs`, `defrecord`, reader conditionals.\n\nData: lists, vectors, maps, sets, keywords, symbols, strings, i48 ints, f64, rationals, regex. Structural sharing.\n\nConcurrency: atoms, refs + `dosync`, agents (`send`/`send-off`/`await`), `:validator`.\n\nminiKanren: `run*`, `run`, `fresh`, `conde`, `==`, `conso`, `appendo`, `membero`, `evalo`.\n\nZig-unique disk I/O (positional, no seek state — thread-safe):\n\n```clojure\n(def f (file/open \"/tmp/x\" {:write true :create true :truncate true}))\n(file/pwrite! f 0 \"hello\")\n(file/fsync! f)                 ;; explicit durability barrier\n(file/close! f)\n\n(file/atomic-spit! \"/tmp/x\" \"hi\")   ;; tmp + fsync + rename (crash-safe)\n(file/read-all-bytes \"/tmp/x\")      ;; → #bytes[2]\u003c68 69\u003e\n```\n\n## Interoperate\n\n| Target | Binary | Use |\n|---|---|---|\n| `zig build run` | `nanoclj` | REPL |\n| `zig build embed-min` | `nanoclj-embed-min` | Minimal (~870 KB) — scripts nREPL/kanren/inet stripped |\n| `zig build embed-safe` | `nanoclj-embed-safe` | Bounded embedded profile |\n| `zig build mcp` | `nanoclj-mcp` | MCP server (Syrup framing via zig-syrup) |\n| `zig build gorj` | `gorj-mcp` | MCP with Clojure-defined tools |\n| `zig build wasm` | `nanoclj.wasm` | WASM (disk I/O stubbed to `Unsupported`) |\n\nEmbed from Zig: add this repo as a dependency, `@import(\"nanoclj\")`, call `eval(source)`.\n\n## Dependency\n\n- [zig-syrup](https://github.com/plurigrid/zig-syrup) — Syrup codec + MCP framing + propagator cells\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmorphism%2Fnanoclj-zig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbmorphism%2Fnanoclj-zig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmorphism%2Fnanoclj-zig/lists"}