Registry / ai-ml / sudoku-rust

sudoku-rust

JSON →
library1.0.7pypypi✓ verified 79d ago

A high-performance Sudoku solver, generator, and validator backed by Rust, with a Python wrapper. Current version 1.0.7, release cadence is irregular. Supports Python >=3.8.

pip install sudoku-rust
INSTALL
IMPORT
SIG · SUDOKU-RUST
S
sudoku-rust
ai-mlpythonv1.0.7
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

check
from sudoku_rust import check
from sudoku_rust import Sudoku
solve
from sudoku_rust import solve
from sudoku_rust import Sudoku
sudoku_rust
import sudoku_rust
from sudoku_rust import Sudoku

Generate a Sudoku puzzle and solve it.

from sudoku_rust import Sudoku, generate_puzzle, solve # Generate a 9x9 puzzle with difficulty 0.5 (0=easy, 1=hard) puzzle = generate_puzzle(0.5) print("Puzzle:", puzzle) # Create a Sudoku instance and solve sudoku = Sudoku(puzzle) solution = solve(sudoku) print("Solution:", solution)
sudoku --version
Debug
Known issues
breakingThe library is a wrapper around Rust code, and on some platforms (e.g., ARM Linux) the pre-built wheels may not be available, requiring Rust toolchain to build from source.
fix
Install Rust via rustup (https://rustup.rs) and then reinstall the package: 'pip install sudoku-rust --no-binary sudoku-rust'.
affects: all
gotchaThe puzzle representation uses 0 for empty cells, not '.' or other placeholders.
fix
Ensure input grids use integer 0 for blanks. Example: [[5,3,0,0,7,0,0,0,0], ...].
affects: all
gotchaThe generate_puzzle function returns a list of lists (nested list), not a NumPy array or flat list.
fix
Expect nested list format; if you need a different format, convert accordingly.
affects: all
Upgrade
Version history
1.0.7latest on PyPI · released Apr 12, 2026
Audit
Dependencies
maturinoptionalBuild backend for Rust-Python bindings
Agent activity
10 hits · last 30 days
node
8
OpenAI (training)
1
Resources
sudoku-rust — pip install sudoku-rust · libregistry