0.3.3 (current) Thoroughness: Medium Understanding: High
by dpc on 2026-04-12
These reviews are from Crev, a distributed system for code reviews. To add your review, set up cargo-crev.
0.3.3 (current) Thoroughness: Medium Understanding: High
by dpc on 2026-04-12
The current version of tower-service is 0.3.3.
0.3.1 (older version) Thoroughness: Low Understanding: Medium
Approved without comment by kornelski on 2021-05-17
These reviews are from cargo-vet. To add your review, set up cargo-vet and submit your URL to its registry.
0.3.3 — diff review from 0.3.2 only (current)
From zcash/rust-ecosystem copy of zcash/librustzcash. Audited without comment by Jack Grigg.
0.3.3 (current)
From kornelski/crev-proofs copy of salsa.debian.org.
Packaged for Debian (stable). Changelog:
The current version of tower-service is 0.3.3.
0.3.2 — diff review from 0.3.1 only (older version)
From mozilla/supply-chain copy of hg. Audited without comment by Mike Hommey.
0.3.2 (older version)
From google/supply-chain copy of chromium. Audited without comment by George Burgess IV.
0.3.2 (older version)
From google/supply-chain copy of chromium. Audited without comment by ChromeOS.
cargo-vet does not verify reviewers' identity. You have to fully trust the source the audits are from.
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.
This crate will not introduce a serious security vulnerability to production software exposed to untrusted input. More…
Lib.rs has been able to verify that all files in the crate's tarball are in the crate's repository with a git tag matching the version. 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 tower-service. Alternatively, you can download the tarball of tower-service v0.3.3 or view the source online.
Review: tower-service 0.3.3
External verification
Package matches public repo https://github.com/tower-rs/tower at commit
646804d77eebf072dac180cb5e1256b9ee7e0229, which is the commit tagged astower-service-0.3.3. The.cargo_vcs_info.jsonsha matches the tag exactly. All files in thetower-service/subdirectory are bit-for-bit identical between the crates.io tarball and the upstream repo at this commit. TheCargo.toml.origin the tarball is identical to the upstreamCargo.toml.Code review findings
Thoroughness level chosen: medium (45 Rust LoC — small enough to read carefully end-to-end).
Claims baseline
The crate claims to define "the core
Servicetrait to Tower" — an asynchronous, request/response based abstraction for clients and servers. It should contain only a trait definition and possibly blanket impls.File map
src/lib.rs— read in full. This is the only Rust source file.Non-negotiable checks
build.rs: Not present. Positive.Cargo.tomldependency list: Zero runtime dependencies ([dependencies]is empty). Dev-dependencies includehttp,tower-layer,tokio, andfutures, which are appropriate for the doctest examples. No concerns.unsafeblocks: The crate has#![forbid(unsafe_code)]at line 7. Confirmed via search — zerounsafeoccurrences. Positive.Detailed findings
The crate contains exactly one file (
src/lib.rs) with:Lint attributes (lines 1–6):
warnfor missing docs/debug impls/idioms,forbid(unsafe_code). Sensible and restrictive.The
Servicetrait (lines 311–356): A generic traitService<Request>with three associated types (Response,Error,Future) and two methods (poll_ready,call). TheFutureassociated type is bound toFuture<Output = Result<Self::Response, Self::Error>>.callhas#[must_use]on its return value. This is a clean, minimal async service abstraction.Blanket impl for
&'a mut S(lines 358–373): Delegates to the innerS. Correct — lifetime bound prevents misuse.Blanket impl for
Box<S>(lines 375–390): Delegates to the innerSwith?Sizedbound. Correct — enablesBox<dyn Service<...>>usage.Documentation (lines 19–310): Extensive rustdoc with examples showing server, client, middleware/layer, and backpressure patterns. The examples use dev-dependencies (
http,tower-layer,tokio,futures). The clone footgun documentation (lines 235–310) is particularly valuable and accurate.No red flags found. No network access, no filesystem access, no process spawning, no env var reading, no obfuscated code, no suspicious patterns. The code does exactly what it claims — defines a trait and two trivial blanket impls.
Cross-check against existing reviews
No prior reviews of this crate at any version in the local proof database.
Open questions / things skipped
CHANGELOG.mdandREADME.md: Not read in detail. These are documentation-only files and do not affect the crate's behavior.Draft review fields