Skip to main content

Module bind

Module bind 

Source
Expand description

High-level helpers intended for language bindings (rustoku-wasm, rustoku-py, …).

Rust consumers of rustoku-lib should use the core crate::Rustoku API directly. This module deliberately sits at rustoku_lib::bind and is not re-exported at the crate root so it stays out of the way.

These functions wrap the core Rustoku primitives and return simple, fully-owned Rust types so that binding crates (rustoku-wasm, rustoku-py, …) contain no solving logic of their own – they only marshal results into the target language’s type system.

Structs§

CandidateChange
SolveOutput
Structured output from a solve-with-steps operation.
SolveStepInfo
Flat, serialisable representation of a single solve step.

Functions§

candidates_grid
Returns the candidate digits for every cell as a 9×9 grid.
generate_complex_str
Advanced generation with specific clues and symmetry.
generate_str
Generates a puzzle for the given difficulty string and returns it as an 81-char string.
is_valid_solution
Returns true if puzzle is a fully-solved, valid Sudoku board.
solve_all_str
Solves puzzle and returns all solutions as 81-char strings.
solve_any_str
Solves puzzle and returns the first solution as an 81-char string, or None if unsolvable.
solve_with_steps
Solves puzzle using human techniques for the given difficulty and returns a full step trace, or None if unsolvable.