Add review for atty v0.2.14
This commit is contained in:
parent
e1928d3224
commit
39a7a460f4
|
@ -0,0 +1,43 @@
|
|||
----- BEGIN CREV PROOF -----
|
||||
kind: package review
|
||||
version: -1
|
||||
date: 2022-09-18T20:21:45.282305997+02:00
|
||||
from:
|
||||
id-type: crev
|
||||
id: YdnEoYtqvbBGv0hhENLDUYmc3tNfm5V5NIG5hCovHyM
|
||||
url: https://git.jcg.re/jcgruenhage/crev-proofs.git
|
||||
package:
|
||||
source: https://crates.io
|
||||
name: atty
|
||||
version: 0.2.14
|
||||
revision: 7b5df17888997d57c2c1c8f91da1db5691f49953
|
||||
digest: WJaqS5xu6ORo2px2Rku1ynYYN4TuCdxeS8LR68ngyw4
|
||||
review:
|
||||
thoroughness: high
|
||||
understanding: high
|
||||
rating: strong
|
||||
comment: |-
|
||||
One of the more foundational crates found in the dependency tree of a lot of
|
||||
rust programs, because both clap and env_logger pull this in as a dependency.
|
||||
|
||||
In my review I've fully read the source code and can confirm that I fully
|
||||
understand what's happening in here. The unix and hermit targets are
|
||||
extremely straight-forward. As for the windows target, that's a bit more
|
||||
complicated, but still manageable in the end. Windows doesn't have a clear
|
||||
API for determining whether something is a (pseudo) TTY, so the heuristics
|
||||
provided by this crate are as good as it's going to get.
|
||||
|
||||
This crate has quite a few unsafe code sections, but that's sometimes
|
||||
required for providing a safe interface. In this case, we need it because the
|
||||
underlying functions for unix (libc) and hermit are unsafe, and the same
|
||||
applies to a bunch of winapi functions used in the heuristics for windows.
|
||||
|
||||
The bits of unsafe code that's not just wrapping an unsafe function provided
|
||||
by another library are all in the windows heuristics, and involved
|
||||
provisioning buffers that winapi calls can write info back into and some
|
||||
pointer magic. This code looks sane to me as well, and it's well commented,
|
||||
explaining what is happening there.
|
||||
----- SIGN CREV PROOF -----
|
||||
hIjxDFFKbpkgF3_pM4Gh2p6w7riZYxNCR6-LxonBWw_rVnxrgTQ8LDjgEP4KMvHX1Z7JyzlxvJN9XxRKdFztCw
|
||||
----- END CREV PROOF -----
|
||||
|
Loading…
Reference in a new issue