Cargo-pup – ArchUnit-style linting for rust
Cargo-pup – ArchUnit-style linting for rust
Hey HN! I’ve been working on cargo-pup, a Rust tool for defining and enforcing architectural rules in your codebase - like ArchUnit for Java, or Clippy, but for project-specific architecture constraints rather than linting. It lets you write architectural assertions in Rust using a builder-style API. For example: Enforce layering: "REST modules shouldn’t use SQL clients" Enforce consistency: "Types implementing MyTrait must be named MyTrait and live in Impl* modules" Pup emits regular rustc lints (just like Clippy or cargo check) and runs either as a test or via a `cargo pup` CLI, the latter of which you can drop into your CI. This is very early days! I work at Datadog, but this isn’t an official project — just something I built to explore what architectural linting might look like in Rust, and to scratch my own itch :) Would love any feedback or questions! Scott
Share cardActual performance
Launch Intel predictions
Analyze your own launch →Correct prediction on native model
Similar products
Reinhardt – Django-style Rust framework; WASM+SSR from one DSL
Resilient-result – Rust-style errors in Python
StatsD in Rust
TF-IDF in Rust
Rust FFI in a Wireshark C dissector
Rust-wasm-webpack
Risp – Lisp in Rust
Screencast: An Introduction to Rust
Handlebars for Rust
Oxischeme – A Scheme implementation in Rust