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 is a systems programming language that focuses on safety, speed, and concurrency. I've been using Rust extensively for WebAssembly development and systems programming. These posts document my Rust learning journey, from basic concepts to advanced patterns, with a focus on practical applications.
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.
Configure Cargo dependency cooldowns in Rust 1.100 to hold back brand-new crate versions, and override the delay when you need an urgent security fix.
Since Wasmtime 48, WASI sockets are denied by default. Allow TCP, UDP and DNS on the CLI and when embedding Wasmtime, or restrict it with an allow-list.
Keep secrets out of spin.toml: run OpenBao in Docker and read secrets from a Rust Spin app with the OpenBao variable provider introduced in Spin 4.2.
The first version of Building Serverless Applications with WebAssembly & Spin is officially released on Leanpub! Grab your copy, check out what's inside, and learn about the upcoming print edition.
Learn and understand how you can build plugins for Fermyon Spin by exploring the check-for-update plugin.
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.