Skip to content
master
Switch branches/tags
Code

Latest commit

chalk@0.75.0-dev.0
chalk-derive@0.75.0-dev.0
chalk-engine@0.75.0-dev.0
chalk-integration@0.75.0-dev.0
chalk-ir@0.75.0-dev.0
chalk-parse@0.75.0-dev.0
chalk-recursive@0.75.0-dev.0
chalk-solve@0.75.0-dev.0

Generated by cargo-workspaces
e0c94db

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Build Status Chalk Book Rust Documentation

chalk

Chalk is a library that implements the Rust trait system, based on Prolog-ish logic rules.

See the Chalk book for more information.

FAQ

How does chalk relate to rustc? The plan is to have rustc use the chalk-solve crate (in this repo) to answer questions about Rust programs, for example, "Does Vec<u32> implement Debug?". Internally, chalk converts Rust-specific information into logic and uses a logic engine to find the answer to the original query. For more details, see this explanation in the chalk book.

Where does the name come from? chalk is named after Chalkidiki, the area where Aristotle was born. Since Prolog is a logic programming language, this seemed a suitable reference.

Blog posts

Here are some blog posts talking about chalk:

REPL

There is a repl mainly for debugging purposes which can be run by cargo run. Some basic examples are in libstd.chalk:

$ cargo run
?- load libstd.chalk
?- Vec<Box<i32>>: Clone
Unique; substitution [], lifetime constraints []

Contributing

If you'd like to contribute, consider joining the Traits Working Group. We hang out on the rust-lang zulip in the #wg-traits stream.

See the contributing chapter in the chalk book for more info.

About

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

Resources

License

Packages

No packages published

Languages