Charon: An Analysis Framework for Rust

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Ho, Son, Boisseau, Guillaume, Franceschino, Lucas, Prak, Yoann, Fromherz, Aymeric, Protzenko, Jonathan
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866916769903411200
author Ho, Son
Boisseau, Guillaume
Franceschino, Lucas
Prak, Yoann
Fromherz, Aymeric
Protzenko, Jonathan
author_facet Ho, Son
Boisseau, Guillaume
Franceschino, Lucas
Prak, Yoann
Fromherz, Aymeric
Protzenko, Jonathan
contents 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 a clean, stable 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.
format Preprint
id arxiv_https___arxiv_org_abs_2410_18042
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Charon: An Analysis Framework for Rust
Ho, Son
Boisseau, Guillaume
Franceschino, Lucas
Prak, Yoann
Fromherz, Aymeric
Protzenko, Jonathan
Programming Languages
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 a clean, stable 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.
title Charon: An Analysis Framework for Rust
topic Programming Languages
url https://arxiv.org/abs/2410.18042