How to Convert a String to a Number in Rust
Learn how to convert a string to an integer or float in Rust with parse, handle invalid input and overflow, and parse hex or binary numbers.
Rust Recipes is a problem-oriented tutorial series for developers learning Rust. Each recipe solves a practical, everyday programming task using idiomatic standard library patterns and popular crates.
Learn how to convert a string to an integer or float in Rust with parse, handle invalid input and overflow, and parse hex or binary numbers.
Learn how to compile a Rust program to WebAssembly with the wasm32-wasip2 target and run it with Wasmtime, including arguments, env vars and files.
Learn how pattern matching works in Rust.
Learn how to share state between multiple threads in Rust.
Learn how to create a simple function-like macro in Rust.
Learn how to build a simple HTTP API in Rust using the popular Actix crate.
Learn how to implement the builder pattern in Rust to create new instances of a custom struct.
Learn how to implement a generic stack in Rust using only the Rust standard library.
Learn how to retrieve the dimensions of a PNG or JPEG image in Rust using the image crate.
Learn how to build a simple TCP echo server in Rust with the standard library.
Learn how to implement binary search in Rust with generics and pattern matching, using only the standard library.
Learn how to read different CSV files in Rust using the csv crate.
Learn how to compute the SHA256 hash of a file in Rust with the sha2 crate.
Learn how to download an image from the web and store it in a file in Rust using reqwest.
Learn how to build a vector containing all file names of a directory in Rust.