logo

Rust crates reviews

Cryptographically verifiable, distributed dependency reviews

crate: shakmaty

https://lib.rs/crates/shakmaty/

Add the last reviewed version to Cargo.toml / [dependencies]:

shakmaty = "0.20.1"

Filter reviews clicking on the numbers in the summary.

Full column names in tooltip hints: rating Negative, rating Neutral, rating Positive, rating Strong, thoroughness, understanding, reviews count.

Neg
Neu
Pos
Str
tho
und
rev
10
10
2
2
2
2
2
2
2
2
2
2
crate version
rating
date
reviewer
thoroughness, understanding
shakmaty 0.20.1
positive
2021-10-16
high, high
alternative:
chess

This is a self-assessment. I am the author of this crate.

Soundness: I am highly confident in soundness. Unfortunately, I could not
avoid two kinds of unsafe blocks, without major performance impact.
Instead, all preconditions are explained thoroughly in comments and asserted
with debug assertions.

(1) The optimizer does not reliably elide bounds checks based on the
assumption that u64::trailing_zeros() will never be larger than 63.
This is important in many hot loops.

(2) The perfect hash function for attack lookups always stays within bounds.
This technique is called Magic Bitboards, widely used and very well
understood in the chess community. When selecting magic factors, exactly this
assumption is tested for all possible inputs.

Correctness: For move generation in standard chess, confidence is based
on a large test suite of randomly generated, as well as historical and tricky
positions, so called perft tests. The numbers are shared in the chess
community and compared across a wide array of implementations.

I am gradually less confident in other features, especially chess variants,
simply because they are less popular and played less often, and Zobrist
hashing, a recent feature addition.

The library has been used to parse 1 billion recorded real world games
(https://database.lichess.org). Some bugs have been found, but in the source
of the data, not this library.

For handling of input formats (FEN, SAN, UCI) I reviewed the code thoroughly
and used fuzz testing to ensure absence of DOS/panics.

© bestia.dev 2021, MIT Licence, Version: 2021.1208.1729

Open source repository for this web app: https://github.com/bestia-dev/cargo_crev_web/