A parsing library and CLI for the binary .puz format used by AcrossLite and
most crossword apps.
The repository is a Cargo workspace with two crates:
parse/is the parsing library, published aspuz-parse.cli/is a command-line tool built on top of it, published aspuz.
The cli crate depends on parse.
- Parses the full
.puzbinary format: metadata, grids, and clues. - Handles extensions like rebus squares and circled cells.
- Validates checksums while parsing and surfaces problems as warnings.
- Optional JSON serialization behind the
jsonfeature. - Pure, memory-safe Rust with zero-copy parsing where it's practical.
Clone the repo:
git clone https://github.com/mwln/puz.rs.git
cd puz.rsThe toolchain is pinned in rust-toolchain.toml, so
rustup picks the right version automatically the first time you run a cargo
command here. That keeps local builds in step with CI.
Build and test the whole workspace:
cargo build
cargo testIf you plan to contribute, see CONTRIBUTING.md for the checks CI runs and how to submit changes.
Add puz-parse to your Cargo.toml, then parse a file:
use puz_parse::parse_file;
fn main() -> Result<(), puz_parse::PuzError> {
let puzzle = parse_file("puzzle.puz")?;
println!("{} by {}", puzzle.info.title, puzzle.info.author);
Ok(())
}Enable the json feature for serde support. See
parse/README.md for the full API, error handling, and more
examples.
The puz command reads one or more .puz files and prints their contents as
JSON:
puz puzzle.puz --prettySee cli/README.md for the available flags and output format.
.puz is a binary format. PUZ.md documents the layout the parser
implements, from the header and checksums through the grid and extension
sections.
Contributions are welcome. CONTRIBUTING.md covers how to set up, the checks to run before opening a pull request, and the review process.
Releases are tag-driven and handled in CI. The process is documented in RELEASING.md.
Licensed under the MIT License.