sudoku-checker

Crates.iosudoku-checker
lib.rssudoku-checker
version0.1.1
created_at2025-05-28 13:02:20.399284+00
updated_at2025-05-28 13:04:09.204307+00
descriptionA sudoku checker only using the type system
homepage
repositoryhttps://github.com/rotmh/sudoku-checker
max_upload_size
id1692761
size11,668
Rotem Horesh (rotmh)

documentation

README

Sudoku Checker

Check a Sudoku board's validity at compile time, using only the type system - if the board is valid, it will compile, if it's not, it won't.

Note: this is just a PoC project, and was only made for fun (there isn't really a reason for you to add this to your crate...).

Example

use sudoku_checker::sudoku;

let sudoku = sudoku! {
    1, 2, _, _, _, _, _, _, _,
    _, _, _, _, _, _, _, _, _,
    _, 8, _, _, _, _, _, _, _,
    _, _, _, _, _, _, _, _, _,
    _, _, _, _, _, _, _, _, _,
    _, _, _, _, _, _, _, _, _,
    _, _, _, _, _, _, _, _, _,
    _, _, _, _, _, _, 7, _, _,
    _, _, _, _, _, _, _, _, 4,
};

Motivation

I encountered this post, which led me to this cool project, and I wanted to create something alike in Rust.

Commit count: 4

cargo fmt