{"id":22273811,"url":"https://github.com/aeneasverif/charon","last_synced_at":"2026-05-25T10:01:20.392Z","repository":{"id":38823020,"uuid":"419729872","full_name":"AeneasVerif/charon","owner":"AeneasVerif","description":"Analyze Rust crates without touching compiler internals","archived":false,"fork":false,"pushed_at":"2026-05-23T06:28:33.000Z","size":13960,"stargazers_count":347,"open_issues_count":98,"forks_count":42,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-05-23T08:30:47.734Z","etag":null,"topics":["compiler","formal-methods","formal-verification","program-verification","rust","rust-lang","static-analysis"],"latest_commit_sha":null,"homepage":"https://aeneasverif.github.io/charon","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AeneasVerif.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-10-21T13:15:47.000Z","updated_at":"2026-05-21T16:55:46.000Z","dependencies_parsed_at":"2023-02-14T15:01:09.689Z","dependency_job_id":"62929e42-e3c1-4ebe-bb68-f64f4c7c0c18","html_url":"https://github.com/AeneasVerif/charon","commit_stats":null,"previous_names":["sonmarcho/charon"],"tags_count":71,"template":false,"template_full_name":null,"purl":"pkg:github/AeneasVerif/charon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AeneasVerif%2Fcharon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AeneasVerif%2Fcharon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AeneasVerif%2Fcharon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AeneasVerif%2Fcharon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AeneasVerif","download_url":"https://codeload.github.com/AeneasVerif/charon/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AeneasVerif%2Fcharon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33469418,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-25T06:32:55.349Z","status":"ssl_error","status_checked_at":"2026-05-25T06:32:35.322Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compiler","formal-methods","formal-verification","program-verification","rust","rust-lang","static-analysis"],"created_at":"2024-12-03T13:16:25.889Z","updated_at":"2026-05-25T10:01:20.350Z","avatar_url":"https://github.com/AeneasVerif.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp\u003e\u003cdiv style=\"text-align: center\"\u003e\n\u003cimg src=\"static/Charon.jpg\"\n     alt=\"Landscape with Charon crossing the Styx\" title=\"Landscape with Charon crossing the Styx\"\n     style=\"\"/\u003e\n\u003cfigcaption\u003e\nPatinir, E., 1515-1524, \u003ci\u003eLandscape with Charon crossing the Styx\u003c/i\u003e [Oil on wood].\nMuseo del Prado, Madrid.\n\u003ca href=\"https://en.wikipedia.org/wiki/Landscape_with_Charon_Crossing_the_Styx\"\u003eSource\u003c/a\u003e\n\u003c/figcaption\u003e\n\u003c/div\u003e\u003c/p\u003e\n\n# Charon\n\nCharon (pronounced \"Ka-ron\") extracts the complete contents of a Rust crate (and its dependencies) into a JSON file:\n\n```json\n{\n  \"crate_name\": \"...\",\n  \"type_decls\": [ ... ],\n  \"fun_decls\": [ ... ],\n  \"global_decls\": [ ... ],\n  \"trait_decls\": [ ... ],\n  \"trait_impls\": [ ... ],\n}\n```\n\nThe output contains the types, functions and traits of the crate and its dependencies, the\nsimplified MIR bodies of functions, source information for each item, and other semantic information described below.\n\nWe are **open to contributions**! Please contact us so that we can coordinate ourselves, if you are\nwilling to contribute. Discussions happen on [Zulip](https://aeneas-verif.zulipchat.com/).\n\n## Usage\n\nRun `charon` inside the crate of interest, much like you would call `cargo build`. It will produce\na `crate_name.llbc` file.\n\nThe `charon-lib` crate can read this file and let you manipulate its contents. Parse the file using\n`serde_json::from_reader::\u003ccharon_lib::export::CrateData\u003e(file)`. OCaml bindings are also available\nin the `charon-ml` folder.\n\nFor more detailed usage instructions, see the [documentation](./docs/usage.md).\n\n## Why Charon?\n\nThe output of Charon looks simple but constructing the relevant information is hard. The purpose of\nCharon is to centralize the efforts of extracting information from rustc internals and turning them\ninto a uniform and usable shape. See the [documentation](./docs/what_charon_does_for_you.md) for an overview of what\nCharon has to do today.\n\nIf you're writing a rustc driver, chances are you could use Charon instead. Charon is however geared\ntowards semantic analyses; it likely won't help you for syntactic analyses like many lints.\n\nCharon is, in Greek mythology, an old man carrying the souls of the deceased accross the Styx,\na river separating the world of the living from the world of the dead. In the present context,\nCharon allows us to cross the river of compiler internals to go from the world of Rust programs to\nthe world of code analysis and verification.\n\n## Limitations\n\nCharon is alpha software. While it works quite well for a large number of crates, it has not reached\nthe full set of features we intend, incorrectly translates code in some edge cases, and a number of\nbreaking changes in its API are planned. See the [limitations](./docs/limitations.md) for details.\n\n## Installation \u0026 Build\n\nIf you use nix, you can directly run `nix run github:AeneasVerif/charon`. Otherwise, read on.\n\nYou first need to install [`rustup`](https://www.rust-lang.org/tools/install) and uninstall any\n`rust` or `cargo` package previously installed in your system, e.g. via `brew`, as they sometimes\nconflict with `rustup`.\n\nAs Charon is set up with cargo, rustup will automatically download and install the proper packages\nupon building the project. If you only want to build the Rust project (in `./charon`), run `make\nbuild-charon-rust` in the root directory. The resulting `charon` binary can be found in `bin/charon`,\nfrom where you can use it.\n\nIf you also want to build the ML library (in `./charon-ml`), you will need to\ninstall OCaml and the proper dependencies.\n\nWe suggest you to follow those [instructions](https://ocaml.org/docs/install.html),\nand install OPAM on the way (same instructions).\n\nFor Charon-ML, we use **OCaml 4.14.0** (`opam switch create 4.14.0+options`) but any\nrecent version will do. In particular, **OCaml 5** works.\n\nThe dependencies can be installed with `opam install . --deps-only`.\n\nYou can then run `make build-charon-ml` to build the ML library, or even simply\n`make` to build the whole project (Rust and OCaml). Finally, you can run the\ntests with `make test`.\n\nAlternatively, you can use Nix and do `nix develop` and all dependencies should be made available.\n\n## Documentation\n\nYou can access the (work-in-progress) Rust documentation\n[online](https://aeneasverif.github.io/charon/charon_lib/index.html).\n\nYou can also run `make doc` to generate the documentation locally.\nIt will generate a documentation accessible from\n[`doc-rust.html`](./doc-rust.html) (for the Rust project) and\n[`doc-ml.html`](./doc-ml.html) (for the ML library).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faeneasverif%2Fcharon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faeneasverif%2Fcharon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faeneasverif%2Fcharon/lists"}