Charon: An Analysis Framework for Rust
Open Access
- 23 July 2025
- book chapter
- Published by Springer Nature
- p. 377-391
Abstract
With the explosion in popularity of the Rust programming language, a wealth of tools have recently been developed to analyze, verify, and test Rust programs. Alas, the Rust ecosystem remains relatively young, meaning that every one of these tools has had to re-implement difficult, time-consuming machinery to interface with the Rust compiler and its cargo build system, to hook into the Rust compiler’s internal representation, and to expose an abstract syntax tree (AST) that is suitable for analysis rather than optimized for efficiency. We address this missing building block of the Rust ecosystem, and propose Charon, an analysis framework for Rust. Charon acts as a swiss-army knife for analyzing Rust programs, and deals with all of the tedium above, providing clients with an AST that can serve as the foundation of many analyses. We demonstrate the usefulness of Charon through a series of case studies, ranging from a Rust verification framework (Aeneas), a compiler from Rust to C (Eurydice), and a novel taint-checker for cryptographic code. To drive the point home, we also re-implement a popular existing analysis (Rudra), and show that it can be replicated by leveraging the Charon framework.Keywords
All Related Versions
This publication has 20 references indexed in Scilit:
- Yuga: Automatically Detecting Lifetime Annotation Bugs in the Rust LanguageIEEE Transactions on Software Engineering, 2024
- Creusot: A Foundry for the Deductive Verification of Rust Programs2022
- HEAPSTER: Analyzing the Security of Dynamic Allocators for Monolithic Firmware Images2022
- Abstract Interpretation of LLVM with a Region-Based Memory Model2022
- HACLxN: Verified Generic SIMD Crypto (for all your favourite platforms)2020
- Leveraging rust types for modular specification and verificationProceedings of the ACM on Programming Languages, 2019
- RustBelt: securing the foundations of the Rust programming languageProceedings of the ACM on Programming Languages, 2017
- Static analysis of energy consumption for LLVM IR programs2015
- Formalizing the LLVM intermediate representation for verified program transformations2012
- Emscripten2011