0.22.9 (older version) Thoroughness: Low Understanding: Medium
by kpreid on 2023-09-06
These reviews are from Crev, a distributed system for code reviews. To add your review, set up cargo-crev
.
The current version of euclid is 0.22.11.
0.22.9 (older version) Thoroughness: Low Understanding: Medium
by kpreid on 2023-09-06
0.20.1 (older version) Thoroughness: Low Understanding: Medium
by git.sr.ht/~icefox on 2019-08-30
Pleasantly unsurprising. It's just math.
These reviews are from cargo-vet. To add your review, set up cargo-vet
and submit your URL to its registry.
The current version of euclid is 0.22.11.
0.22.9 (older version)
From google/supply-chain copy of chromium. Audited without comment by George Burgess IV.
0.22.7 (older version)
From google/supply-chain copy of chromium. Audited without comment by ChromeOS.
0.22.7 (older version)
From kornelski/crev-proofs copy of salsa.debian.org.
Only in debcargo (unstable). Changelog:
0.22.6 (older version)
From kornelski/crev-proofs copy of git.savannah.gnu.org.
Packaged for Guix (crates-graphics)
* (all versions)
From mozilla/supply-chain copy of hg. By Nicolas Silva on 2019-03-14.
I wrote most of the commits in the euclid reprository and review every change that is not produced by me.
cargo-vet does not verify reviewers' identity. You have to fully trust the source the audits are from.
This crate will not introduce a serious security vulnerability to production software exposed to untrusted input. More…
This crate can be compiled, run, and tested on a local workstation or in controlled automation without surprising consequences. More…
Inspection reveals that the crate in question does not attempt to implement any cryptographic algorithms on its own.
Note that certification of this does not require an expert on all forms of cryptography: it's expected for crates we import to be "good enough" citizens, so they'll at least be forthcoming if they try to implement something cryptographic. When in doubt, please ask an expert.
All crypto algorithms in this crate have been reviewed by a relevant expert.
Note: If a crate does not implement crypto, use does-not-implement-crypto
,
which implies crypto-safe
, but does not require expert review in order to
audit for.
May have been packaged automatically without a review
Lib.rs has been able to verify that all files in the crate's tarball are in the crate's repository. Please note that this check is still in beta, and absence of this confirmation does not mean that the files don't match.
Crates in the crates.io registry are tarball snapshots uploaded by crates' publishers. The registry is not using crates' git repositories, so there is a possibility that published crates have a misleading repository URL, or contain different code from the code in the repository.
To review the actual code of the crate, it's best to use cargo crev open euclid
. Alternatively, you can download the tarball of euclid v0.22.11 or view the source online.
This is a preliminary "does this look okay to use" code review, writing down everything I noticed -- I have not yet attempted to use the library.
Build
Good.
no_std
support, in the conventional fashion of astd
feature that can be disabled.libm
. All dependencies are optional exceptnum-traits
.API design
Dubious in places.
Rect::inner_rect()
contains adebug_assert!
that the size of the result is not negative, yet this is not an invariant of the type, and the potential panic is not documented.approxord
module contains no items that match its module docs, justmax()
andmin()
forPartialOrd
rather than onlyOrd
.The following are “this doesn't exist” rather than “this exists but is bad”:
Angle
andRotation2D
type are specifically radians. This prevents some opportunities for exact arithmetic on fractions or multiples of whole turns (because 360 is a rational number and 2π is not).Vector4D
type, only the specific-purposeHomogeneousVector
.Documentation
cast()
methods have an un-track_caller
ed panic if the underlyingnum_traits::NumCast
fails. On the ones which have documentation at all (e.g.Length
), the description ofcast()
andtry_cast()
as "Cast" and "Fallible cast" respectively might lead the reader to think that the former is an infallible conversion, not a panicking one.Code
#![cfg_attr(feature = "cargo-clippy", allow(just_underscores_and_digits))]
use mint;
items.approxeq.rs
: Default epsilons are a dubious concept in the first place, but particularly, using 1e-6 for f64 as well as f32 seems a bit lax.rigid.rs
: "All matrix multiplication in this module is in row-vector notation," which seems gratuitously inconsistent with most common notation and with thetransform2d
andtransform3d
modules. But perhaps I have misunderstood.