{"id":13749204,"url":"https://github.com/chrjabs/rustsat","last_synced_at":"2026-01-30T11:46:19.531Z","repository":{"id":180400764,"uuid":"509449342","full_name":"chrjabs/rustsat","owner":"chrjabs","description":"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.","archived":false,"fork":false,"pushed_at":"2026-01-26T12:27:17.000Z","size":10041,"stargazers_count":51,"open_issues_count":28,"forks_count":13,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-27T01:52:29.317Z","etag":null,"topics":["encodings","sat","satisfiability"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/rustsat","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/chrjabs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-07-01T12:37:39.000Z","updated_at":"2026-01-26T12:25:59.000Z","dependencies_parsed_at":"2025-11-30T16:02:41.941Z","dependency_job_id":null,"html_url":"https://github.com/chrjabs/rustsat","commit_stats":null,"previous_names":["chrjabs/rustsat"],"tags_count":163,"template":false,"template_full_name":null,"purl":"pkg:github/chrjabs/rustsat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrjabs%2Frustsat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrjabs%2Frustsat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrjabs%2Frustsat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrjabs%2Frustsat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrjabs","download_url":"https://codeload.github.com/chrjabs/rustsat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrjabs%2Frustsat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28911988,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T08:15:08.179Z","status":"ssl_error","status_checked_at":"2026-01-30T08:14:31.507Z","response_time":66,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["encodings","sat","satisfiability"],"created_at":"2024-08-03T07:00:56.952Z","updated_at":"2026-01-30T11:46:19.526Z","avatar_url":"https://github.com/chrjabs.png","language":"Rust","funding_links":[],"categories":["Projects"],"sub_categories":["Libraries"],"readme":"[![crates.io](https://img.shields.io/crates/v/rustsat?style=for-the-badge\u0026logo=rust)](https://crates.io/crates/rustsat)\n[![docs.rs](https://img.shields.io/docsrs/rustsat?style=for-the-badge\u0026logo=docsdotrs)](https://docs.rs/rustsat)\n[![Coveralls](https://img.shields.io/coverallsCoverage/github/chrjabs/rustsat?style=for-the-badge\u0026logo=coveralls)](https://coveralls.io/github/chrjabs/rustsat)\n[![PyPI](https://img.shields.io/pypi/v/rustsat?style=for-the-badge\u0026logo=pypi\u0026logoColor=%23ffffff)](https://pypi.org/project/rustsat)\n[![License](https://img.shields.io/crates/l/rustsat?style=for-the-badge)](./LICENSE)\n\n\u003c!-- cargo-rdme start --\u003e\n\n# RustSAT - A Comprehensive SAT Library for Rust\n\nRustSAT is a collection of interfaces and utilities for working with the boolean satisfiability problem in Rust.\nThis library aims to provide implementations of elements commonly used in the development of software in the area of satisfiability solving.\nThe focus of the library is to provide as much ease of use without giving up on performance.\n\n## Example\n\n```rust\nlet mut instance: SatInstance = SatInstance::new();\nlet l1 = instance.new_lit();\nlet l2 = instance.new_lit();\ninstance.add_binary(l1, l2);\ninstance.add_binary(!l1, l2);\ninstance.add_unit(l1);\nlet mut solver = rustsat_minisat::core::Minisat::default();\nsolver.add_cnf(instance.into_cnf().0).unwrap();\nlet res = solver.solve().unwrap();\nassert_eq!(res, SolverResult::Sat);\nlet sol = solver.full_solution().unwrap();\nassert_eq!(sol[l1.var()], TernaryVal::True);\nassert_eq!(sol[l2.var()], TernaryVal::True);\n```\n\n## Crates\n\nThe RustSAT project is split up into multiple crates that are all contained in [this repository](https://github.com/chrjabs/rustsat/).\nThe general architecture is illustrated in [this architecture\ndiagram](https://github.com/chrjabs/rustsat/blob/main/docs/architecture.png).\nThese are the crates the project consists of:\n\n| Crate | Description |\n| --- | --- |\n| `rustsat` | The main library, containing basic types, traits, encodings, parsers, and more. |\n| `rustsat-tools` | A collection of small helpful tools based on RustSAT that can be installed as binaries. For a list of available tools, see [this directory](https://github.com/chrjabs/rustsat/tree/main/tools/src/bin) with short descriptions of the tools in the headers of the files. |\n| `rustsat-\u003csatsolver\u003e` | Interfaces to SAT solvers that can be used alongside RustSAT. Currently interfaces are available for `cadical`, `kissat`, `glucose`, and `minisat`. |\n| `rustsat-ipasir` | [IPASIR](https://github.com/biotomas/ipasir) bindings to use any compliant solver with RustSAT. |\n| `pigeons` | A library for writing [VeriPB](https://gitlab.com/MIAOresearch/software/VeriPB) proofs. Used by RustSAT with the `proof-logging` feature. |\n\n## Comparison to Other Libraries\n\nFor a basic comparison of RustSAT to other libraries, you can have a look at [this benchmark\nrepository](https://github.com/chrjabs/rustsat-benchmarks/) and the [RustSAT tool\npaper](https://media.christophjabs.info/papers/Jabs2025RustsatLibrarySat.pdf).\n\n## Citing\n\nIf you use RustSAT in your research, please cite the following system description paper.\n\n```bibtex\n@inproceedings{Jabs2025RustsatLibrarySat,\n  title       = {{RustSAT}: {A} Library For {SAT} Solving in Rust},\n  author      = {Jabs, Christoph},\n  booktitle   = {28th International Conference on Theory and Applications of Satisfiability\n  Testing ({SAT} 2025)},\n  editor      = {Berg, Jeremias and Nordstr{\\\"o}m, Jakob},\n  year        = {2025},\n  volume      = {341},\n  publisher   = {Schloss Dagstuhl---Leibniz-Zentrum f{\\\"{u}}r Informatik},\n  series      = {Leibniz International Proceedings in Informatics ({LIPIcs})},\n  pages       = {15:1--15:13},\n  doi         = {10.4230/LIPIcs.SAT.2025.15},\n  eprint      = {2505.15221},\n}\n```\n\n## Installation\n\nTo use the RustSAT library as a dependency in your project, simply run `cargo add rustsat`.\nTo use an SAT solver interface in your project, run `cargo add rustsat-\u003csatsolver\u003e`.\nTypically, the version of the SAT solver can be selected via crate features, refer to the documentation of the respective SAT solver crate for details.\n\nTo install the binary tools in `rustsat-tools` run `cargo install rustsat-tools`.\n\n## Features\n\n| Feature name | Description |\n| --- | --- |\n| `optimization` | Include optimization (MaxSAT) data structures etc. |\n| `multiopt` | Include data structures etc. for multi-objective optimization. |\n| `compression` | Enable parsing and writing compressed input. |\n| `fxhash` | Use the faster firefox hash function from `rustc-hash` in RustSAT. |\n| `rand` | Enable randomization features. (Shuffling clauses etc.) |\n| `ipasir-display` | Changes `Display` trait for `Lit` and `Var` types to follow IPASIR variables indexing. |\n| `serde` | Add implementations for [`serde::Serialize`](https://docs.rs/serde/latest/serde/trait.Serialize.html) and [`serde::Deserialize`](https://docs.rs/serde/latest/serde/trait.Deserialize.html) for many library types |\n| `proof-logging` | Add proof logging / certification support to constraint encodings |\n| `verbose-proofs` | Make the generated proofs (see `proof-logging`) more verbose, for debugging and testing |\n| `_bench` | Enable benchmark tests. Behind feature flag since it requires unstable Rust. |\n| `_internals` | Make 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. |\n\n## Examples\n\nFor example usage refer to the small example tools in the [`rustsat-tools`\ncrate](https://crates.io/crates/rustsat_tools) at `tools/src/bin`. For a bigger\nexample you can look at this [multi-objective optimization\nsolver](https://github.com/chrjabs/scuttle).\n\n## Minimum Supported Rust Version (MSRV)\n\nCurrently, the MSRV of RustSAT is 1.76.0, the plan is to always support an MSRV that is at\nleast a year old.\n\nBumps in the MSRV will _not_ be considered breaking changes. If you need a specific MSRV, make\nsure to pin a precise version of RustSAT.\n\n\u003c!-- cargo-rdme end --\u003e\n\n## Main Branch Documentation\n\nThe API documentation of the main branch can be found\n[here](https://christophjabs.info/rustsat/main/rustsat/).\n\n## Python Bindings\n\nThis library also comes with experimental Python bindings to use its encodings\nfrom Python. The Python bindings are available at\n[PyPI](https://pypi.org/project/rustsat/). For more details see the [Python API\ndocumentation](https://christophjabs.info/rustsat/pyapi/).\n\n## Contributing\n\nWe are welcoming contributions in the form of pull requests and suggestions.\nKindly make sure to read\n[`CONTRIBUTING.md`](https://github.com/chrjabs/rustsat/blob/main/CONTRIBUTING.md)\nfirst.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrjabs%2Frustsat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrjabs%2Frustsat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrjabs%2Frustsat/lists"}