Tools Testing

19 articles
How to Build Universal macOS Binaries with Rust Compile Rust for x86_64 and aarch64 separately, then merge them using lipo to create a universal macOS binary. How to Create Minimal Reproducible Examples for Debugging Create a minimal reproducible example by initializing a new Cargo project, adding only necessary dependencies, and isolating the failing code to confirm the error. How to Debug Rust Code Running on Mobile Devices Debugging Rust code on mobile devices requires leveraging the native toolchains of your target platform (Android NDK or iOS Xcode) rather than relying solely on standard `cargo` commands. How to Debug Rust in RustRover (IntelliJ) Run cargo dev setup intellij with the rustc repo path to enable RustRover debugging. How to Debug Rust in VS Code Install the Rust extension, enable debug symbols in Cargo.toml, and configure launch.json to debug Rust code in VS Code. How to Set Up CI/CD for Rust Projects (GitHub Actions) Set up GitHub Actions CI/CD for Rust by creating a main.yml workflow file that runs tests and lints on every push. How to Set Up CI/CD for Rust Projects (GitLab CI) Set up GitLab CI for Rust by creating a .gitlab-ci.yml file that defines a test job using the official Rust Docker image. How to Set Up CI for Multi-Platform Rust Builds Configure GitHub Actions to run tests, linting, and documentation checks for a multi-platform Rust book project using mdbook and cargo. How to Target Android from Rust Add the Android target with rustup and specify it in the cargo build command to compile Rust code for Android. How to Target iOS from Rust Install the iOS target with rustup and build your Rust project using the aarch64-apple-ios target flag to create binaries for iOS devices. How to Target musl for Fully Static Linux Binaries Add the musl target and build with the --target flag to create a fully static Linux binary. How to Use Address Sanitizer (ASan) with Rust Enable Address Sanitizer in Rust by setting RUSTFLAGS to -Zsanitizer=address and building with a nightly toolchain. How to Use Breakpoints and Watch Expressions in Rust Run Rust code with debug info using cargo and set breakpoints or watch variables in GDB, LLDB, or your IDE. How to Use clippy Lints to Improve Code Quality Enable Clippy in your project by running `cargo clippy` to catch common mistakes, inefficient patterns, and style violations that the compiler misses. How to Use GDB with Rust Programs Compile Rust with debug symbols and attach GDB to the binary in target/debug to inspect variables and step through code. How to Use LLDB with Rust Programs Compile Rust with debug symbols and use LLDB commands to run, break, and inspect your program. How to Use Miri to Detect Undefined Behavior Miri is an interpreter for Rust that detects undefined behavior (UB) by running your code in a controlled environment rather than on native hardware. How to Use println! Debugging in Rust Effectively Use the println! macro with curly braces to print variable values to the console for immediate debugging in Rust. How to Use Valgrind with Rust Programs Compile Rust with debug symbols and run Valgrind memcheck to detect memory leaks and invalid access in unsafe code.