{"id":18045131,"url":"https://github.com/ctamblyn/sudoku-solver","last_synced_at":"2025-04-10T01:30:40.618Z","repository":{"id":57668944,"uuid":"370493322","full_name":"ctamblyn/sudoku-solver","owner":"ctamblyn","description":"Sudoku solver library for Rust","archived":false,"fork":false,"pushed_at":"2023-11-30T16:02:46.000Z","size":64,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T00:29:20.981Z","etag":null,"topics":["algorithm","rust","sudoku","sudoku-solver"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ctamblyn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-24T21:51:28.000Z","updated_at":"2024-01-26T08:43:34.000Z","dependencies_parsed_at":"2023-11-30T16:49:13.115Z","dependency_job_id":null,"html_url":"https://github.com/ctamblyn/sudoku-solver","commit_stats":{"total_commits":50,"total_committers":1,"mean_commits":50.0,"dds":0.0,"last_synced_commit":"9be41e56a3d3a040c5baa6e955fcb407fc27c855"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctamblyn%2Fsudoku-solver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctamblyn%2Fsudoku-solver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctamblyn%2Fsudoku-solver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctamblyn%2Fsudoku-solver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ctamblyn","download_url":"https://codeload.github.com/ctamblyn/sudoku-solver/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248140228,"owners_count":21054264,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithm","rust","sudoku","sudoku-solver"],"created_at":"2024-10-30T18:12:10.891Z","updated_at":"2025-04-10T01:30:40.592Z","avatar_url":"https://github.com/ctamblyn.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sudoku solver library for Rust\n\n![Test results](https://github.com/ctamblyn/sudoku-solver/actions/workflows/quickstart.yml/badge.svg)\n[![Crates.io](https://img.shields.io/crates/v/sudoku-solver)](https://crates.io/crates/sudoku-solver)\n[![Documentation](https://docs.rs/sudoku-solver/badge.svg)](https://docs.rs/sudoku-solver)\n\nThis library provides a very simple backtracking algorithm for solving sudoku puzzles.\n\n## Examples\n\nThe `solve()` function will yield the first solution found for a given puzzle,\nor `None` if no solution exists:\n\n```rust\nuse sudoku_solver::*;\n\nfn main() {\n    let board = Board::from(\u0026[\n        [0, 2, 0, 0, 0, 0, 0, 0, 0], // row 1\n        [0, 0, 0, 6, 0, 0, 0, 0, 3], // row 2\n        [0, 7, 4, 0, 8, 0, 0, 0, 0], // row 3\n        [0, 0, 0, 0, 0, 3, 0, 0, 2], // row 4\n        [0, 8, 0, 0, 4, 0, 0, 1, 0], // row 5\n        [6, 0, 0, 5, 0, 0, 0, 0, 0], // row 6\n        [0, 0, 0, 0, 1, 0, 7, 8, 0], // row 7\n        [5, 0, 0, 0, 0, 9, 0, 0, 0], // row 8\n        [0, 0, 0, 0, 0, 0, 0, 4, 0], // row 9\n    ]);\n\n    println!(\"Puzzle:\\n{}\\n\", board);\n\n    if let Some(solution) = solve(\u0026board) {\n        println!(\"Solution:\\n{}\\n\", solution);\n    } else {\n        println!(\"No solution found.\");\n    }\n}\n```\n\nIf a puzzle has multiple solutions and you want to iterate over them, you can use\n`SolutionIter`:\n\n```rust\nuse sudoku_solver::*;\n\nfn main() {\n    let board = Board::from(\u0026[\n        [9, 0, 6, 0, 7, 0, 4, 0, 3], // row 1\n        [0, 0, 0, 4, 0, 0, 2, 0, 0], // row 2\n        [0, 7, 0, 0, 2, 3, 0, 1, 0], // row 3\n        [5, 0, 0, 0, 0, 0, 1, 0, 0], // row 4\n        [0, 4, 0, 2, 0, 8, 0, 6, 0], // row 5\n        [0, 0, 3, 0, 0, 0, 0, 0, 5], // row 6\n        [0, 3, 0, 7, 0, 0, 0, 5, 0], // row 7\n        [0, 0, 7, 0, 0, 5, 0, 0, 0], // row 8\n        [4, 0, 5, 0, 1, 0, 7, 0, 8], // row 9\n    ]);\n\n    for solution in SolutionIter::new(\u0026board) {\n        println!(\"Solution:\\n{}\\n\", solution);\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctamblyn%2Fsudoku-solver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fctamblyn%2Fsudoku-solver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctamblyn%2Fsudoku-solver/lists"}