Crustify: Repository-Level Generation of Safe Rust Bindings with LLM Agents and Coverage-Guided Testing
Presents novel ML-powered tooling for automated safe language interop, relevant to systems programming and ML engineering research.
AI Summary
Crustify introduces an LLM agent system that automatically generates safe Rust bindings for C libraries using coverage-guided testing, reducing unsafe code from 100% to under 2%.
Excerpt
Wrapping C code in a safe Rust interface lets Rust applications use it without writing unsafe code, until the code itself is migrated to Rust. Such bindings are tedious and error-prone to write, however: their internals use unsafe code that the Rust compiler does not check, so a single mistake can introduce undefined behavior (UB), and they have so far been written mostly by hand. We present Crustify, an agentic co-translator that generates safe Rust bindings for repository-level C libraries. Cr
