{"id":23735681,"url":"https://github.com/nikola-jokic/cellang","last_synced_at":"2026-01-24T18:09:57.602Z","repository":{"id":270388708,"uuid":"896808383","full_name":"nikola-jokic/cellang","owner":"nikola-jokic","description":"CEL interpreter, parser, lexer, and other utilities","archived":false,"fork":false,"pushed_at":"2025-01-23T19:50:13.000Z","size":291,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T03:08:56.846Z","etag":null,"topics":["cel-language","interpr","lex","parser","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/cellang","language":"Rust","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/nikola-jokic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-01T11:14:15.000Z","updated_at":"2025-01-23T15:33:21.000Z","dependencies_parsed_at":"2024-12-30T19:36:35.554Z","dependency_job_id":"e1b3b516-cabf-4c06-ae12-bf76979aaa6f","html_url":"https://github.com/nikola-jokic/cellang","commit_stats":null,"previous_names":["nikola-jokic/cellang"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikola-jokic%2Fcellang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikola-jokic%2Fcellang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikola-jokic%2Fcellang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikola-jokic%2Fcellang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nikola-jokic","download_url":"https://codeload.github.com/nikola-jokic/cellang/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248510002,"owners_count":21116131,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cel-language","interpr","lex","parser","rust"],"created_at":"2024-12-31T06:31:27.612Z","updated_at":"2026-01-24T18:09:57.595Z","avatar_url":"https://github.com/nikola-jokic.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CEL language interpreter for Rust\n\nThis is a rust implementation of the [CEL](https://cel.dev/) language.\n\nThis project is built for [BountyHub](https://bountyhub.org) platform, but is open-source and can be used by anyone.\n\nIf you find any issues, please report them.\n\n## Getting started\n\n```bash\ngit clone https://github.com/nikola-jokic/cellang.git\ncd cellang\ncargo build\n```\n\n### Running the test suite\n\nThe workspace is fully covered by automated checks. Locally you can mirror CI with:\n\n```bash\ncargo test --locked --all-features --all-targets\ncargo test --locked --all-features --doc\n```\n\nExamples under `crates/cellang/examples` can be exercised via:\n\n```bash\ncd crates/cellang\nfor example in examples/*.rs; do \\\n\tname=$(basename \"${example%.rs}\"); \\\n\tcargo test --locked --all-features --example \"$name\"; \\\ndone\n```\n\nor run directly with `cargo run --example \u003cname\u003e` for interactive experimentation.\n\n### Example overview\n\n| Example | Highlights |\n| --- | --- |\n| `simple` | Basic expression evaluation, child runtimes, and scalar values. |\n| `create_function` | Registering function declarations plus native Rust implementations. |\n| `concurrency` | Sharing a runtime builder across threads for parallel evaluation. |\n| `user_role_derive` | Using the `derive` feature to expose Rust structs and methods to CEL. |\n| `comprehensions` | Practical use of CEL macros like `exists`, `filter`, `map`, and `all`. |\n| `env_snapshot` | Building, serializing, and rehydrating a reusable environment snapshot. |\n\n## CLI\n\nThe `cellang-cli` crate exposes a developer-friendly command line interface for inspecting CEL programs.\n\n```bash\ncargo run -p cellang-cli -- lex expr --format json \"a + size(b)\"\ncargo run -p cellang-cli -- parse file --path script.cel --format debug\ncargo run -p cellang-cli -- eval expr --expr \"users[0].has_role(role)\" --env-path ./env.json\n```\n\nSubcommands:\n\n- `lex` – emit tokens for a file or inline expression (formatted as pretty JSON or debug output).\n- `parse` – dump the AST generated by the Pratt parser.\n- `eval` – evaluate an expression within a runtime populated from a JSON environment file.\n\n## Repository structure\n\nThis repository is a rust workspace, with the following crates:\n\n- `cellang`: The main library crate located at [lib](./crates/cellang)\n- `cellang-cli`: A CLI tool to evaluate CEL expressions located at [cli](./crates/cellang-cli)\n\n## License\n\nThis project is licensed under the [MIT license](./LICENSE).\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the MIT license, shall be licensed as above, without any additional terms or conditions.\n\n## Special thanks\n\nSpecial thanks to [Jon Gjengset](https://github.com/jonhoo) for his amazing [video](https://youtu.be/mNOLaw-_Buc) which helped me get started with this project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikola-jokic%2Fcellang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikola-jokic%2Fcellang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikola-jokic%2Fcellang/lists"}