# rust-lang/chalk

An implementation and definition of the Rust trait system using a PROLOG-like logic solver

Repository: https://github.com/rust-lang/chalk
Canonical: https://ross.abutalabs.com/products/rust-lang-chalk
Homepage: https://rust-lang.github.io/chalk/book/
Language: Rust
License: NOASSERTION
License Family: other
Last push: 2026-02-08T16:41:24+00:00

## Health v2 (maintenance only)
Score: 52/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 66, release rhythm 8, longevity 100
- inputs: {"age_days": 4056, "days_push": 206, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2010, forks 183 (observed 2026-08-28T04:06:04.916342+00:00)

## What it is
Chalk is a Rust library that implements the Rust trait system using a Prolog-like logic solver, converting trait and impl information into logical inference rules to answer queries such as whether a type implements a trait. It was intended for integration into rustc but has been sunset in favor of the newer next-generation trait solver.

## Use cases
- answer trait queries like does Vec<u8> implement Debug
- implement a Rust-like type checker or linter
- study how Rust traits lower to logic
- experiment with logic programming for type systems
- build tooling that resolves trait obligations

## When to choose
- you need a standalone, embeddable trait solver for Rust-like languages
- you want to learn or research trait system design and lowering to logic
- you are building experimental type-checking tools

## When to avoid
- you need a trait solver for production rustc work - use the new next-generation trait solver instead
- you expect active development - the project has been sunset
- you need a general-purpose Prolog engine

## Facets
- artifact type: library
- maturity: maintenance
- function: interpreter, type-system, compiler, parser
- domain: programming-languages, compilers
- platform: rust, cross-platform
- tags: trait-system, logic-programming, prolog, rust-compiler, type-inference, sunset-project, algorithms

## Member repositories
- rust-lang/chalk (main) score 52

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:04.916342+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:01:14.954591+00:00, confidence not recorded.
  - readme: https://github.com/rust-lang/chalk (fetched 2026-08-28T04:06:04.916342+00:00, sha e384ccf36da3)
  - homepage: https://rust-lang.github.io/chalk/book/ (fetched 2026-08-29T10:41:03.771212+00:00, sha f7baaf6b92fc)
- Data as of 2026-08-30T08:39:29.467469+00:00.
