{"id":13395205,"url":"https://github.com/rust-lang/chalk","last_synced_at":"2026-01-12T02:38:04.238Z","repository":{"id":35454292,"uuid":"39721486","full_name":"rust-lang/chalk","owner":"rust-lang","description":"An implementation and definition of the Rust trait system using a PROLOG-like logic solver","archived":false,"fork":false,"pushed_at":"2025-04-20T00:34:57.000Z","size":14588,"stargazers_count":1919,"open_issues_count":43,"forks_count":183,"subscribers_count":67,"default_branch":"master","last_synced_at":"2025-04-30T12:19:32.728Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://rust-lang.github.io/chalk/book/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rust-lang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","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}},"created_at":"2015-07-26T10:13:23.000Z","updated_at":"2025-04-28T13:19:14.000Z","dependencies_parsed_at":"2023-11-18T19:39:26.950Z","dependency_job_id":"d0d84fda-9ff2-4c24-8385-f7e68ffa7aae","html_url":"https://github.com/rust-lang/chalk","commit_stats":{"total_commits":2668,"total_committers":125,"mean_commits":21.344,"dds":0.6371814092953523,"last_synced_commit":"c83151f01e67af489d54423c71b9547cd80e8178"},"previous_names":[],"tags_count":91,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-lang%2Fchalk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-lang%2Fchalk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-lang%2Fchalk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-lang%2Fchalk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rust-lang","download_url":"https://codeload.github.com/rust-lang/chalk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252835276,"owners_count":21811515,"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":[],"created_at":"2024-07-30T17:01:46.124Z","updated_at":"2026-01-12T02:38:04.215Z","avatar_url":"https://github.com/rust-lang.png","language":"Rust","funding_links":[],"categories":["Projects","Rust"],"sub_categories":["Verification"],"readme":"[![Build Status](https://github.com/rust-lang/chalk/workflows/CI/badge.svg)](https://github.com/rust-lang/chalk/actions?workflow=CI)\n[![Chalk Book](https://img.shields.io/badge/book-chalk-blue.svg)](https://rust-lang.github.io/chalk/book/)\n[![Rust Documentation](https://img.shields.io/badge/api-rustdoc-blue.svg)](https://rust-lang.github.io/chalk/chalk/)\n\n# chalk\n\nChalk is a library that implements the Rust trait system, based on [Prolog-ish][Prolog] logic rules.\n\nSee the [Chalk book](https://rust-lang.github.io/chalk/book/) for more information.\n\n## FAQ\n\n**How does chalk relate to rustc?** The plan is to have rustc use the\n`chalk-solve` crate (in this repo) to answer questions about Rust programs, for\nexample, \"Does `Vec\u003cu32\u003e` implement `Debug`?\". Internally, chalk converts\nRust-specific information into logic and uses a logic engine to find the answer\nto the original query. For more details, see\n[this explanation in the chalk book][chalk-lowering-details].\n\n**Where does the name come from?** `chalk` is named after [Chalkidiki], the area where [Aristotle] was\nborn. Since Prolog is a logic programming language, this seemed a\nsuitable reference.\n\n[Prolog]: https://en.wikipedia.org/wiki/Prolog\n[Chalkidiki]: https://en.wikipedia.org/wiki/Chalkidiki\n[Aristotle]: https://en.wikipedia.org/wiki/Aristotle\n[chalk-lowering-details]: https://rust-lang.github.io/chalk/book/#chalk-works-by-converting-rust-goals-into-logical-inference-rules\n\n## Blog posts\n[blog-posts]: #blog-posts\nHere are some blog posts talking about chalk:\n\n- [Lowering Rust Traits to Logic](https://smallcultfollowing.com/babysteps/blog/2017/01/26/lowering-rust-traits-to-logic/)\n    - Explains the basic concepts at play\n- [Unification in Chalk, Part 1](https://smallcultfollowing.com/babysteps/blog/2017/03/25/unification-in-chalk-part-1/)\n    - An introduction to unification\n- [Unification in Chalk, Part 2](https://smallcultfollowing.com/babysteps/blog/2017/04/23/unification-in-chalk-part-2/)\n    - Extending the system for associated types\n- [Negative reasoning in Chalk](https://aturon.github.io/blog/2017/04/24/negative-chalk/)\n    - How to prove that something is not true\n- [Query structure in chalk](https://smallcultfollowing.com/babysteps/blog/2017/05/25/query-structure-in-chalk/)\n    - The basic chalk query structure, with pointers into the chalk implementation\n- [Cyclic queries in chalk](https://smallcultfollowing.com/babysteps/blog/2017/09/12/tabling-handling-cyclic-queries-in-chalk/)\n    - Handling cyclic relations and enabling the implementation of implied bounds and other long-desired features in an elegant way\n\n## REPL\n\nThere is a repl mainly for debugging purposes which can be run by `cargo run`. Some basic examples are in [libstd.chalk](libstd.chalk):\n```bash\n$ cargo run\n?- load libstd.chalk\n?- Vec\u003cBox\u003ci32\u003e\u003e: Clone\nUnique; substitution [], lifetime constraints []\n```\n\n## Contributing\n\nIf you'd like to contribute, consider joining the [Traits Working Group][working-group].\nWe hang out on the [rust-lang zulip][rust-lang-zulip] in the [#wg-traits][wg-traits-stream] stream.\n\nSee [the contributing chapter][contributing] in the chalk book for more info.\n\n[working-group]: https://rust-lang.github.io/compiler-team/working-groups/traits/\n[rust-lang-zulip]:https://rust-lang.zulipchat.com\n[wg-traits-stream]: https://rust-lang.zulipchat.com/#narrow/stream/144729-wg-traits\n[contributing]: https://rust-lang.github.io/chalk/book/contribution_guide.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-lang%2Fchalk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frust-lang%2Fchalk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-lang%2Fchalk/lists"}