Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
E

eurydice

> 编程语言
Open source

Eurydice compiles (a decent subset of) Rust to C. Verify programs in Rust, still get C code for legacy environments.

399 stars0 likes0 views
WebsiteGitHub

About

Eurydice compiles (a decent subset of) Rust to C. Verify programs in Rust, still get C code for legacy environments.

Eurydice

Eurydice is a compiler from Rust to C. The purpose of Eurydice is to provide a backwards-compatibility story as the verification ecosystem gradually transitions to Rust. New programs can be written in Rust, in turn making them safer and easier to verify; but for legacy environments that cannot yet take a dependency on the Rust toolchain, Eurydice allows generating C code as a stopgap measure.

Guarantee

Eurydice's informal guarantee is: if the Rust program terminates without panicking, then the Eurydice-compiled C code computes the same result without undefined behavior. If the Rust program panics (e.g., on signed integer overflow, out-of-bounds array access), no guarantees are made about the behavior of the generated C code.

Currently (late 2023), the flagship example for Eurydice is Kyber, a Post-Quantum cryptographic algorithm authored and verified in Rust for the general public, and compiled to C via Eurydice for Mozilla's NSS library.

In terms of software architecture, Eurydice consumes Rust programs via the Charon infrastructure, then extracts Rust to KaRaMeL's internal AST via a type-driven translation. Once in the KaRaMeL AST, 30+ nano-passes allow going from Rust down to C code. About half of these passes were already implemented for KaRaMeL, the rest of the passes reuse the KaRaMeL infrastructure but were freshly written for Eurydice.

If you want to contribute or ask questions, we strongly encourage you to join the Zulip.

Install

We recommend using Nix to easily ensure you are running the right versions of the tools and libraries. With nix, you can run:

bash
$ nix run 'github:aeneasverif/eurydice#charon' -- [CHARON_OPTIONS]
$ nix run 'github:aeneasverif/eurydice' -- [EURYDICE_OPTIONS] 

Alternatively, you can do a local setup as follows.

…

Submitting a successful PR

The C output of the test suite is under version control, and your PR will fail CI if running make test generates a diff for the C files in out/. The reason for this is that we need to assess the impact of a PR on the shape of the generated C code. To make sure the output of the tests is up-to-date, you can run make -B test to force regeneration of the C files.

Our CI will also check that your OCaml and C files have proper formatting -- the target make format-apply reformats your source code to conform to our style guide. It might sometimes be difficult to have the exact right versions of ocamlformat and clang-format -- in case your PR still fails, we recommend running nix develop followed by make format-apply.

Issues· 40 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言