RealtimeSanitizer for Rust: A New Open Source Library

2025-01-23

This post introduces `rtsan-standalone-rs`, a new open-source library bringing LLVM's RealtimeSanitizer (RTSan) to Rust. RTSan helps detect hard-to-find real-time violations in your code, such as memory allocations, crucial for applications like audio processing and self-driving cars. The author details the implementation, usage with macros like `nonblocking` and `blocking`, and how to integrate it into your Rust projects. This library offers immediate access to RTSan's capabilities in stable Rust, improving the safety and predictability of real-time applications before its official integration into LLVM20.