{"id":17084418,"url":"https://github.com/niklasf/shakmaty","last_synced_at":"2025-04-08T03:17:13.182Z","repository":{"id":16732029,"uuid":"80480033","full_name":"niklasf/shakmaty","owner":"niklasf","description":"A Rust library for chess and chess variant rules and operations","archived":false,"fork":false,"pushed_at":"2024-09-22T13:13:42.000Z","size":2480,"stargazers_count":212,"open_issues_count":8,"forks_count":42,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-10-30T00:30:32.194Z","etag":null,"topics":["chess","lichess","rust"],"latest_commit_sha":null,"homepage":"https://docs.rs/shakmaty","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/niklasf.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"COPYING","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},"funding":{"github":"niklasf"}},"created_at":"2017-01-31T01:07:33.000Z","updated_at":"2024-10-25T14:11:55.000Z","dependencies_parsed_at":"2024-04-18T15:38:39.438Z","dependency_job_id":"1a943fe8-94b5-4a9c-85ca-9b2fd6dd3857","html_url":"https://github.com/niklasf/shakmaty","commit_stats":{"total_commits":1631,"total_committers":20,"mean_commits":81.55,"dds":0.04475781729000616,"last_synced_commit":"8750c798cbbc4de6afac7a66b2e630f6fe2c71a4"},"previous_names":[],"tags_count":74,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklasf%2Fshakmaty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklasf%2Fshakmaty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklasf%2Fshakmaty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklasf%2Fshakmaty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/niklasf","download_url":"https://codeload.github.com/niklasf/shakmaty/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247767237,"owners_count":20992548,"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":["chess","lichess","rust"],"created_at":"2024-10-14T13:07:05.684Z","updated_at":"2025-04-08T03:17:13.162Z","avatar_url":"https://github.com/niklasf.png","language":"Rust","funding_links":["https://github.com/sponsors/niklasf"],"categories":[],"sub_categories":[],"readme":"# shakmaty\n\nA Rust library for chess move generation\n\n[![crates.io](https://img.shields.io/crates/v/shakmaty.svg)](https://crates.io/crates/shakmaty)\n[![docs.rs](https://docs.rs/shakmaty/badge.svg)](https://docs.rs/shakmaty)\n\n## Features\n\n- Generate legal moves:\n\n  ```rust\n  use shakmaty::{Chess, Position};\n\n  let pos = Chess::default();\n  let legals = pos.legal_moves();\n  assert_eq!(legals.len(), 20);\n  ```\n\n- Play moves:\n\n  ```rust\n  use shakmaty::{Square, Move, Role};\n\n  // 1. e4\n  let pos = pos.play(\u0026Move::Normal {\n      role: Role::Pawn,\n      from: Square::E2,\n      to: Square::E4,\n      capture: None,\n      promotion: None,\n  })?;\n  ```\n\n- Detect game end conditions: `pos.is_checkmate()`, `pos.is_stalemate()`,\n  `pos.is_insufficient_material()`, `pos.outcome()`.\n\n- Read and write FEN, SAN and UCI notation.\n\n- Supports all Lichess variants: Standard chess, Chess960, Antichess, Atomic,\n  King of the Hill, Three-Check, Crazyhouse, Racing Kings and Horde. Provides\n  vocabulary to implement other variants.\n\n- Bitboards and compact fixed shift magic attack tables.\n\n- Zobrist hash positions.\n\n- Probe Syzygy tablebases with [shakmaty-syzygy](https://crates.io/crates/shakmaty-syzygy).\n\n## Documentation\n\n[Read the documentation](https://docs.rs/shakmaty)\n\n## Benchmarks\n\nSimple [perft](https://www.chessprogramming.org/Perft) of the initial\nposition. No hashtables. i7-6850K CPU @ 3.60GHz.\n\n| perft                                                    | 4      | 5       |\n| -------------------------------------------------------- | ------ | ------- |\n| shakmaty 0.16.0                                          | 1.0 ms | 24.1 ms |\n| [jordanbray/chess](https://crates.io/crates/chess) 3.1.1 | 0.8 ms | 18.6 ms |\n| Stockfish 8 (x86-64-bmi2)                                | 4 ms   | 33 ms   |\n\nIt should be noted that Stockfish is not optimized for perft speed and also\nmaintains additional data structures for evaluation. Newer versions of\nStockfish put even less emphasis on this.\n\n## License\n\nShakmaty is licensed under the GPL-3.0 (or any later version at your option).\nSee the COPYING file for the full license text.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniklasf%2Fshakmaty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fniklasf%2Fshakmaty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniklasf%2Fshakmaty/lists"}