Charon
Extracts the complete contents of a Rust crate and its dependencies into a JSON/LLBC file for analysis and verification tools.
At a Glance
About Charon
Charon is an open-source tool from the AeneasVerif organization that extracts the complete contents of a Rust crate and its dependencies into a JSON file. The output includes types, functions, traits, simplified MIR function bodies, and source information for each item. It is beta software according to its README.
What It Is
Charon is a Rust analysis front end. It is run inside a crate much like cargo build and produces a crate_name.llbc file. The file holds type declarations, function declarations, global declarations, trait declarations and trait implementations. The README says its purpose is to centralize the work of extracting information from rustc internals and turn it into a uniform, usable shape. It is aimed at semantic analyses and verification rather than syntactic analyses such as lints.
How the Workflow Runs
Users run the charon binary in the crate of interest. The charon-lib Rust crate reads the output, which can be parsed with serde_json into the CrateData type. OCaml bindings are provided in the charon-ml folder. The project is a companion to Aeneas, the AeneasVerif organization's flagship toolchain for verifying Rust programs in proof assistants, with Lean as its main backend.
Setup Path
Building requires rustup, and rustup installs the needed toolchain automatically. make build-charon-rust builds the Rust part, and the OCaml library needs OCaml and opam. Nix users can run nix run github:AeneasVerif/charon. A manual, Rust API docs and benchmarks are published online.
Current Status
The README describes Charon as beta software. It says the translation is well tested but has open bugs, and that breaking API changes are planned.
Collections
Popular collections
- UI Design Skills for Coding Agents
Collection by @mayachen
- Find the Ways Your AI App Can Fail Before Launch
Collection by @samirhaddad
- Give Your AI Agent the Meaning Behind Your Database
Collection by @danielokafor
- See What Your Agent Is Doing
Collection by @evtuff
Add Charon to one of your collections.
Community Discussions
Be the first to start a conversation about Charon
Share your experience with Charon, ask questions, or help others learn from your insights.
Pricing
Open Source
Charon core tool released under the Apache License 2.0 (OSI-approved); free to use and self-build.
- License: Apache License 2.0 (Apache-2.0)
- Extracts Rust crate contents into JSON (LLBC)
- charon-lib Rust crate and OCaml bindings (charon-ml)
- Beta software
Capabilities
Key Features
- Extracts Rust crates and dependencies into JSON/LLBC files
- Exports types, functions, globals, traits and trait impls
- Provides simplified MIR function bodies
- Includes source information for each item
- charon-lib Rust library for reading output
- OCaml bindings (charon-ml)
- Nix support
