{"id":13608609,"url":"https://github.com/calcit-lang/calcit","last_synced_at":"2026-05-03T07:10:57.286Z","repository":{"id":38828534,"uuid":"358273748","full_name":"calcit-lang/calcit","owner":"calcit-lang","description":"Indentation-based ClojureScript dialect in Rust and compiling to JavaScript ES Modules","archived":false,"fork":false,"pushed_at":"2026-04-18T15:58:14.000Z","size":4691,"stargazers_count":136,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-04-18T17:38:14.086Z","etag":null,"topics":["cirru","clojure","clojurescript","immutable-data-structures","indentation","language","lisp"],"latest_commit_sha":null,"homepage":"https://calcit-lang.org/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/calcit-lang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"Agents.md","dco":null,"cla":null}},"created_at":"2021-04-15T13:43:15.000Z","updated_at":"2026-03-28T18:13:37.000Z","dependencies_parsed_at":"2026-01-30T14:13:47.734Z","dependency_job_id":null,"html_url":"https://github.com/calcit-lang/calcit","commit_stats":{"total_commits":543,"total_committers":2,"mean_commits":271.5,"dds":"0.0018416206261510082","last_synced_commit":"83184dd2d300736a187d39cf07e0357e2ab74faf"},"previous_names":["calcit-lang/calcit.rs","calcit-lang/calcit_runner.rs"],"tags_count":418,"template":false,"template_full_name":null,"purl":"pkg:github/calcit-lang/calcit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calcit-lang%2Fcalcit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calcit-lang%2Fcalcit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calcit-lang%2Fcalcit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calcit-lang%2Fcalcit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/calcit-lang","download_url":"https://codeload.github.com/calcit-lang/calcit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calcit-lang%2Fcalcit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32036799,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"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":["cirru","clojure","clojurescript","immutable-data-structures","indentation","language","lisp"],"created_at":"2024-08-01T19:01:28.633Z","updated_at":"2026-05-03T07:10:57.280Z","avatar_url":"https://github.com/calcit-lang.png","language":"Rust","funding_links":[],"categories":["Uncategorized","Lisp","Rust","Clojure-likes"],"sub_categories":["Uncategorized","Other dialects and variants","[Calcit](http://calcit-lang.org/)"],"readme":"### Calcit Scripting Language\n\n\u003e Semantically a dialect of ClojureScript. Built with Rust. Compiles to JavaScript ES Modules.\n\n- Home https://calcit-lang.org/\n- API Doc https://apis.calcit-lang.org/\n- Guidebook https://guide.calcit-lang.org/\n\n[Browse examples](https://github.com/calcit-lang/calcit/tree/main/calcit) or also [try WASM version online](https://github.com/calcit-lang/calcit-wasm-play).\n\nCore design:\n\n- Interpreter runs on Rust, extensible with Rust FFI\n- Persistent Data Structure\n- Structural Editor(with indentation-based syntax as a fallback)\n- Lisp macros, functional style\n- Compiles to JavaScript in ES Modules, JavaScript Interop\n- Hot code swapping friendly\n\n### Install ![GitHub Release](https://img.shields.io/github/v/release/calcit-lang/calcit)\n\nBuild and install with Rust:\n\n```bash\n# get Rust\ncurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n\n# get Calcit\ncargo install calcit\n```\n\n3 binaries are installed:\n\n- `calcit`, the runtime and js compiler\n- `caps`, for downloading dependencies declared in `deps.cirru`\n- `bundle_calcit`, bundle code if you don't want to use Calcit Editor\n\nTo use Calcit in GitHub Actions, try [setup-cr](https://github.com/calcit-lang/setup-cr).\n\n### Usage\n\nSnippets evaluating:\n\n```bash\ncr eval 'range 100'\n\ncr eval 'thread-first 100 range (map $ \\ * % %)'\n```\n\nRun with a [compact.cirru](https://github.com/calcit-lang/lilac/blob/main/compact.cirru):\n\n```bash\ncr compact.cirru # run once (default)\n\ncr # by default, it picks `compact.cirru`\n\ncr -w # watch mode (explicit flag required)\n```\n\nBy default Calcit reads `:init-fn` and `:reload-fn` inside `compact.cirru` configs. You may also specify functions,\n\n```bash\ncr --init-fn='app.main/main!' --reload-fn='app.main/reload!'\n```\n\nand even configure `:entries` in `compact.cirru`:\n\n```bash\ncr --entry server\n```\n\n### JavaScript codegen\n\nIt compiles to JavaScript and runs in consistet semantics. However it might require a lot of JavaScript interop.\n\n```bash\ncr js # compile to js, also picks `compact.cirru` by default\ncr js --emit-path=out/ # compile to js and save in `out/`\n```\n\nBy default, js code is generated to `js-out/`. You will need Vite or Node to run it, from an entry file:\n\n```js\nimport { main_$x_, reload_$x_ } from \"./js-out/app.main.mjs\";\nmain_$x_(); // which corresponds to `main!` function in calcit\n```\n\n### Calcit Editor \u0026 Bundler\n\nInstall [Calcit Editor](https://github.com/calcit-lang/editor) and run `ct` to launch editor server,\nwhich writes `compact.cirru` and `.compact-inc.cirru` on saving. Try launching example by cloning [Calcit Workflow](https://github.com/calcit-lang/calcit-workflow).\n\nRead more in [Minimal Calcit](https://github.com/calcit-lang/minimal-calcit/blob/main/README.md) to learn how to code Calcit with a plain text editor.\n\nRead more in [Respo Calcit Workflow](https://github.com/calcit-lang/respo-calcit-workflow) to learn to create an MVC webpage with [Respo](http://respo-mvc.org/).\n\n### MCP (Model Context Protocol) Support\n\nCalcit provides MCP server functionality for integration with AI assistants and development tools. The MCP server offers tools for:\n\n- **Code Management**: Read, write, and modify Calcit namespaces and definitions\n- **Project Operations**: Manage modules, dependencies, and configurations\n- **Calcit Runner**: Start/stop background runner processes with incremental updates\n- **Documentation**: Query API docs, reference materials, and dependency documentation\n\n#### Incremental File Processing\n\nWhen using the Calcit Runner through MCP:\n\n1. **Start Runner**: Use `start_calcit_runner` to launch the background process. This automatically:\n   - Creates a `.calcit-tmp/` directory\n   - Copies the current `compact.cirru` as a temporary baseline\n\n2. **Generate Incremental Updates**: After making changes to your code, use `generate_calcit_incremental` to:\n   - Compare current `compact.cirru` with the temporary baseline\n   - Generate a `.compact-inc.cirru` file with only the changes\n   - Apply incremental updates to the running process\n\n3. **Check Results**: After generating the incremental file, always check the runner logs using `grab_calcit_runner_logs` to verify that updates were applied successfully.\n\nThis workflow enables efficient hot-reloading during development without restarting the entire application.\n\n### Modules\n\n`deps.cirru` declares dependencies that need to download, which correspond to repositories on GitHub. Specify a branch or a tag:\n\n```cirru\n{}\n  :calcit-version |0.9.11\n  :dependencies $ {}\n    |calcit-lang/memof |0.0.11\n    |calcit-lang/lilac |main\n```\n\nRun `caps` to download. Sources are downloaded into `~/.config/calcit/modules/`. If a module contains `build.sh`, it will be executed mostly for compiling Rust dylibs.\n\n`:calcit-version` helps in check version, and provides hints in [CI](https://github.com/calcit-lang/setup-cr) environment.\n\nTo load modules, use `:modules` configuration and `compact.cirru`(which normally generated from `calcit.cirru`):\n\n```cirru\n:configs $ {}\n  :modules $ [] |memof/compact.cirru |lilac/\n```\n\nPaths defined in `:modules` field are just loaded as files from `~/.config/calcit/modules/`,\ni.e. `~/.config/calcit/modules/memof/compact.cirru`.\n\nModules that ends with `/`s are automatically suffixed `compact.cirru` since it's the default entry.\n\n### Development\n\nI use these commands to run local examples:\n\n```bash\n# run tests in Rust\ncargo run --bin cr -- calcit/test.cirru -1\n\n# run tests in Node.js\ncargo run --bin cr -- calcit/test.cirru -1 js \u0026\u0026 yarn try-js\n\n# run snippet\ncargo run --bin cr -- eval 'range 100'\n\ncr compact.cirru -1 ir # compiles intermediate representation into program-ir.cirru\n```\n\n- [Cirru Parser](https://github.com/Cirru/parser.rs) for indentation-based syntax parsing.\n- [Cirru EDN](https://github.com/Cirru/cirru-edn.rs) for `compact.cirru` file parsing.\n- [Ternary Tree](https://github.com/calcit-lang/ternary-tree.rs) for immutable list data structure.\n\nOther tools:\n\n- [Error Viewer](https://github.com/calcit-lang/calcit-error-viewer) for displaying `.calcit-error.cirru`\n- [IR Viewer](https://github.com/calcit-lang/calcit-ir-viewer) for rendering `program-ir.cirru`\n\nSome resources:\n\n- Dev Logs https://github.com/calcit-lang/calcit/discussions\n- 视频记录 https://space.bilibili.com/14227306/channel/seriesdetail?sid=281171\n\n### License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalcit-lang%2Fcalcit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcalcit-lang%2Fcalcit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalcit-lang%2Fcalcit/lists"}