logo

Rust crates reviews

Cryptographically verifiable, distributed dependency reviews

crate: ptr-union

https://lib.rs/crates/ptr-union/

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

ptr-union = "1.0.0"

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
2
2
2
2
crate version
rating
date
reviewer
thoroughness, understanding
ptr-union 1.0.0
positive
2020-02-10
high, high

I am the author of this crate. As such, I obviously trust it and believe it is useful.
So this review will instead point at the trickiest parts and try to rationalize them.

Don't believe cargo-geiger for this crate. The majority of the API is macro-generated,
and cargo-geiger misses unsafe invocations emitted by the complex macro.

This crate makes liberal usage of unreachable_unchecked,
but for cases where the case is trivially actually unreachable.

However, using this crate will decrease the required unsafe for your crate,
as it gives you alignment-tagged pointer unions for only one line of unsafe per union type.
The unsafe burden you take on is to guarantee the alignment required to store the tag within.

Smoke tests are run under miri, but the crate could potentially do with some more examples
as well as some more tests to ensure that all of the functionality works as advertised.

I've only put this review as positive rather than strong because of a lack of real-world use.
As of yet, the library is just of theoretical use, and has yet to be stress tested for real.

© bestia.dev 2023, MIT License, Version: 2023.608.1636

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