Crates.io | sudoku-checker |
lib.rs | sudoku-checker |
version | 0.1.1 |
created_at | 2025-05-28 13:02:20.399284+00 |
updated_at | 2025-05-28 13:04:09.204307+00 |
description | A sudoku checker only using the type system |
homepage | |
repository | https://github.com/rotmh/sudoku-checker |
max_upload_size | |
id | 1692761 |
size | 11,668 |
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...).
use sudoku_checker::sudoku;
let sudoku = sudoku! {
1, 2, _, _, _, _, _, _, _,
_, _, _, _, _, _, _, _, _,
_, 8, _, _, _, _, _, _, _,
_, _, _, _, _, _, _, _, _,
_, _, _, _, _, _, _, _, _,
_, _, _, _, _, _, _, _, _,
_, _, _, _, _, _, _, _, _,
_, _, _, _, _, _, 7, _, _,
_, _, _, _, _, _, _, _, 4,
};
I encountered this post, which led me to this cool project, and I wanted to create something alike in Rust.