A Rust crate is a distributable package of Rust code. Crates are the basic unit of reuse in Rust’s package ecosystem, commonly published so other projects can add them as dependencies. A crate may provide libraries, build scripts, macros, or command-line tools, and it can be fetched automatically by the build system during compilation.
In cyber security, crates matter because dependency code is often trusted to run inside the build process. A malicious or compromised crate can read local source files, inspect environment variables, or make network requests from a developer machine or CI system. That makes supply-chain abuse possible even when the final application is not directly exposed. Defenders reduce this risk with dependency pinning, review of crate updates, minimal build permissions, and monitoring for unexpected build-time behavior.


