Skip to content

super7ramp/croissant

Repository files navigation

Croissant

This is a crossword solver backed by various SAT solvers.

This is slow.

This is unusable.

This is a toy project.

Play

First, install Rust – you'll need the nightly toolchain.

Then try this out:

cargo run "\
....
..#.
A..."

It should return:

CHIZ
HE#O
ASIA

Good job! You just created a crossword. Now you can read the help page:

🥐 Welcome to Croissant, a crossword solver that smells good

Usage: croissant-cli [OPTIONS] <GRID>

Arguments:
  <GRID>
          The grid as a string; Each new line is a new row, '.' is a blank, '#' is a block

Options:
  -w, --wordlist <WORDLIST>
          The path to the word list; File must contain one word per line and nothing else

  -s, --solver <SOLVER>
          The solver to use
          
          [default: logicng]

          Possible values:
          - cadical: The slow; Its name sounds good though, doesn't it?
          - logicng: The less slow and thus the default; Congrats!
          - splr:    The slowest and buggiest, but that's why we love it ❤️

  -c, --count <COUNT>
          The desired number of solutions
          
          [default: 1]

  -h, --help
          Print help (see a summary with '-h')

  -V, --version
          Print version

Enjoy!

Goals

  • ✅ Have fun!
  • ✅ Explore SAT solvers available in Rust:
  • ✅ Implement a CLI using clap.
  • ✅ Understand Cargo feature configuration: Put each bundled solver behind a feature flag.
  • 🚧 Discover WebAssembly: Compile Croissant to wasm and call it from a simple web application.
  • 🚧 Scratch dynamic loading in Rust: Discover and use solvers compiled as shared libraries.
  • 🚧 Document and publish a crate.

Other Projects

If you're looking for a fast crossword solver in Rust, check out xwords-rs.

If you're looking for another SAT-based crossword solver, check out Croiseur and its SAT solver plugin. It's in Java.

About

A crossword solver backed by various SAT solvers

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages