Rust Recipes
View CommandsCargo commands for building, testing, and publishing Rust projects. Manage dependencies and compile optimized binaries.
8 recipes
Code Quality with Clippy and rustfmt
Enforce code quality and consistent formatting using clippy for linting and rustfmt for automatic code formatting.
Cross-Compilation with Cargo and cross
Cross-compile Rust binaries for different operating systems and architectures using cargo and the cross tool.
Audit Dependencies with cargo-audit and cargo-deny
Scan Rust dependencies for security vulnerabilities, license violations, and supply chain risks.
Cargo Project Init with Proper Structure
Initialize a new Rust project with Cargo, set up workspace structure, and configure essential project metadata.
Publish to crates.io with Proper Metadata
Prepare, validate, and publish a Rust crate to crates.io with complete metadata, documentation, and versioning.
Optimize Release Builds for Size and Speed
Tune Cargo release profiles to produce smaller, faster binaries using LTO, codegen units, and stripping.
Testing with cargo test, Doc Tests, Integration Tests
Write and run unit tests, doc tests, and integration tests using Cargo's built-in testing framework.
Compile Rust to WebAssembly with wasm-pack
Build Rust libraries as WebAssembly modules for use in browsers and Node.js with wasm-pack and wasm-bindgen.