RepositoryRustFIFinland
chrjabs

chrjabs/rustsat

This library aims to provide implementations of elements commonly used in the development on software in the area of satisfiability solving. The focus of the library is to provide as much ease of use without giving up on performance.

75stars
16forks
21issues
3views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: encodings

#1 Repository of the month

1
TINIX TRENDING·Topic: satisfiability

#1 Repository of the month

4
TINIX TRENDING·Topic: sat

#4 Repository of the month

crates.io docs.rs Coveralls PyPI License

RustSAT - A Comprehensive SAT Library for Rust

RustSAT is a collection of interfaces and utilities for working with the boolean satisfiability problem in Rust. This library aims to provide implementations of elements commonly used in the development of software in the area of satisfiability solving. The focus of the library is to provide as much ease of use without giving up on performance.

Example

let mut instance: SatInstance = SatInstance::new();
let l1 = instance.new_lit();
let l2 = instance.new_lit();
instance.add_binary(l1, l2);
instance.add_binary(!l1, l2);
instance.add_unit(l1);
let mut solver = rustsat_minisat::core::Minisat::default();
solver.add_cnf(instance.into_cnf().0).unwrap();
let res = solver.solve().unwrap();
assert_eq!(res, SolverResult::Sat);
let sol = solver.full_solution().unwrap();
assert_eq!(sol[l1.var()], TernaryVal::True);
assert_eq!(sol[l2.var()], TernaryVal::True);

Crates

The RustSAT project is split up into multiple crates that are all contained in this repository. The general architecture is illustrated in this architecture diagram. These are the crates the project consists of:

CrateDescription
rustsatThe main library, containing basic types, traits, encodings, parsers, and more.
rustsat-toolsA collection of small helpful tools based on RustSAT that can be installed as binaries. For a list of available tools, see this directory with short descriptions of the tools in the headers of the files.
rustsat-<satsolver>Interfaces to SAT solvers that can be used alongside RustSAT. Currently interfaces are available for cadical, kissat, glucose, and minisat.
rustsat-ipasirIPASIR bindings to use any compliant solver with RustSAT.
pigeonsA library for writing VeriPB proofs. Used by RustSAT with the proof-logging feature.

Comparison to Other Libraries

For a basic comparison of RustSAT to other libraries, you can have a look at this benchmark repository and the RustSAT tool paper.

Citing

If you use RustSAT in your research, please cite the following system description paper.

@inproceedings{Jabs2025RustsatLibrarySat,
  title       = {{RustSAT}: {A} Library For {SAT} Solving in Rust},
  author      = {Jabs, Christoph},
  booktitle   = {28th International Conference on Theory and Applications of Satisfiability
  Testing ({SAT} 2025)},
  editor      = {Berg, Jeremias and Nordstr{\"o}m, Jakob},
  year        = {2025},
  volume      = {341},
  publisher   = {Schloss Dagstuhl---Leibniz-Zentrum f{\"{u}}r Informatik},
  series      = {Leibniz International Proceedings in Informatics ({LIPIcs})},
  pages       = {15:1--15:13},
  doi         = {10.4230/LIPIcs.SAT.2025.15},
  eprint      = {2505.15221},
}

Installation

To use the RustSAT library as a dependency in your project, simply run cargo add rustsat. To use an SAT solver interface in your project, run cargo add rustsat-<satsolver>. Typically, the version of the SAT solver can be selected via crate features, refer to the documentation of the respective SAT solver crate for details.

To install the binary tools in rustsat-tools run cargo install rustsat-tools.

Features

Feature nameDescription
optimizationInclude optimization (MaxSAT) data structures etc.
multioptInclude data structures etc. for multi-objective optimization.
compressionEnable parsing and writing compressed input.
fxhashUse the faster firefox hash function from rustc-hash in RustSAT.
randEnable randomization features. (Shuffling clauses etc.)
ipasir-displayChanges Display trait for Lit and Var types to follow IPASIR variables indexing.
serdeAdd implementations for serde::Serialize and serde::Deserialize for many library types
proof-loggingAdd proof logging / certification support to constraint encodings
verbose-proofsMake the generated proofs (see proof-logging) more verbose, for debugging and testing
_benchEnable benchmark tests. Behind feature flag since it requires unstable Rust.
_internalsMake some internal data structures for e.g. encodings public. This is useful when basing a more complex encoding on the RustSAT implementation of another encoding. Note that the internal API might change between releases.

Examples

For example usage refer to the small example tools in the rustsat-tools crate at tools/src/bin. For a bigger example you can look at this multi-objective optimization solver.

Minimum Supported Rust Version (MSRV)

Currently, the MSRV of RustSAT is 1.87.0, the plan is to always support an MSRV that is at least a year old.

Bumps in the MSRV will not be considered breaking changes. If you need a specific MSRV, make sure to pin a precise version of RustSAT.

Main Branch Documentation

The API documentation of the main branch can be found here.

Python Bindings

This library also comes with experimental Python bindings to use its encodings from Python. The Python bindings are available at PyPI. For more details see the Python API documentation.

Contributing

We are welcoming contributions in the form of pull requests and suggestions. Kindly make sure to read CONTRIBUTING.md first.

Similar Projects

Discover other similar projects and AI models.

RepositoryRust
sarsko/CreuSAT

CreuSAT - A formally verified SAT solver written in Rust and verified with Creusot.

710
Aug 20, 2026
RepositoryC++
audemard/glucose

The glucose SAT solver

159
Oct 5, 2026
RepositoryC++
meelgroup/approxmc

Approximate Model Counter

94
Nov 23, 2026
RepositoryRust
NationalSecurityAgency/Foundation

Foundation is a repository of formal cryptographic specifications

66
Nov 19, 2026
Modeltext-to-speech
k2-fsa/OmniVoice

OmniVoice 🌍 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OmniVoice is a massively multilingual zero-shot text-to-speech (TTS) model supporting over 600 languages. Built on a novel diffusion language model-style architecture, it delivers high-quality speech w...

♥0
4.3M
Nov 20, 2026
Modeltranslation
facebook/nllb-200-distilled-600M

NLLB-200 This is the model card of NLLB-200's distilled 600M variant. Here are the metrics(https://tinyurl.com/nllb200densedst600mmetrics) for that particular checkpoint. - Information about training algorithms, parameters, fairness constraints or o...

♥0
628.3k
Feb 14, 2024
Modeltranslation
facebook/nllb-200-3.3B

NLLB-200 This is the model card of NLLB-200's 3.3B variant. Here are the metrics(https://tinyurl.com/nllb200dense3bmetrics) for that particular checkpoint. - Information about training algorithms, parameters, fairness constraints or other applied ap...

♥0
239.3k
Feb 11, 2023
Modelfill-mask
jhu-clsp/mmBERT-base

mmBERT: A Modern Multilingual Encoder !License: MIT(https://img.shields.io/badge/License-MIT-yellow.svg)(https://opensource.org/licenses/MIT) !Paper(https://img.shields.io/badge/Paper-Arxiv-red)(https://arxiv.org/abs/2509.06888) !Model(https://img.s...

♥0
354.7k
Oct 7, 2025
Modeltext-generation
sarvamai/sarvam-105b

!image(https://cdn-uploads.huggingface.co/production/uploads/60270a7c32856987162c641a/j1SbA6V6HixP1-6H0N41q.png) Want a smaller model? Download Sarvam-30B(https://huggingface.co/sarvamai/sarvam-30b/)! Index 1. Introduction(introduction) 2. Architectu...

♥0
3.2k
Sep 21, 2026