Tracing tracing is a framework for instrumenting Rust programs to collect structured, event-based diagnostic information. It is alternative to the older log crate and has adapters to be backwards compatible. To enable tracing in your applic...
Build Time Tooling This section covers "build-time" tooling, or code that is run prior to compiling a crate's source code. Conventionally, build-time code lives in a build.rs file and is commonly referred to as a "build script". Common use...
Encoding | Recipe | Crates | Categories | |--------|--------|------------| | Percent-encode a string | [![percent-encoding-badge]][url] | [![cat-encoding-badge]][cat-encoding] | | Encode a string as application/x-www-form-urlencoded | [![ur...
Error Handling | Recipe | Crates | Categories | |--------|--------|------------| | Composing errors with an enum | [![thiserror-badge]][thiserror] | [![cat-rust-patterns-badge]][cat-rust-patterns] | | Dynamic errors with anyhow | [![anyhow-...
File System | Recipe | Crates | Categories | |--------|--------|------------| | Read a whole file into a string | [![std-badge]][std] [![tempfile-badge]][tempfile] | [![cat-filesystem-badge]][cat-filesystem] | | Write a string to a file | [...
Hardware Support | Recipe | Crates | Categories | |--------|--------|------------| | Check number of logical cpu cores | [![num_cpus-badge]][num_cpus] | [![cat-hardware-support-badge]][cat-hardware-support] |
Memory Management | Recipe | Crates | Categories | |--------|--------|------------| | Declare lazily evaluated constant | [![lazy_static-badge]][lazy_static] | [![cat-caching-badge]][cat-caching] [![cat-rust-patterns-badge]][cat-rust-patter...
Networking | Recipe | Crates | Categories | |--------|--------|------------| | Listen on unused port TCP/IP | [![std-badge]][std] | [![cat-net-badge]][cat-net] | | TCP echo server | [![std-badge]][std] | [![cat-net-badge]][cat-net] | | TCP...