AIThis post was created with the assistance of artificial intelligence (AI).

TL;DR

Buying for a business?Offer from Amazon

Get business pricing on monitors, keyboards and dev gear

  • Business-only prices and quantity discounts
  • Tax-exempt purchasing
  • Multiple users, one account, clear invoices
As an affiliate, we earn on qualifying purchases.

Eurydice is a project in the Aeneas tool suite that translates Rust programs into C while aiming to preserve their structure and important language semantics. The approach may help high-assurance software projects use Rust code with C-oriented tools, but generic types, dynamically sized data and C aliasing rules create constraints.

Eurydice, a project that translates Rust programs into C, is being developed to produce output that retains more of the source code’s structure than conventional machine-code-oriented compilation. The approach could help high-assurance software teams use Rust in settings where verification and compliance tools are designed for C, though the generated code and its limitations require careful review.

Eurydice is part of Aeneas, a collection of tools connected to formal verification of Rust programs. The project began in 2023. Aeneas projects are maintained by people employed by Inria, France’s national computer-science research institution, and Microsoft; the projects also accept contributions from outside the organizations, according to LWN.net’s report.

Like many compilers, Eurydice converts source code into an intermediate representation, applies a series of transformations, then emits code in a target language. Its stated distinction is an emphasis on keeping the original program’s structure while removing or translating Rust features that C does not directly provide. In a simple example, Rust functions that calculate a greatest common divisor and a least common multiple become C functions with recognizable conditional and arithmetic operations. Temporary variables can be added to preserve evaluation order.

That output is not necessarily idiomatic C, and “readable” is a judgment rather than a measurable guarantee. The report contrasts Eurydice’s structurally similar output with the optimized, less recognizable code that rustc may produce when targeting machine code. Eurydice has also been used to translate some post-quantum cryptography routines from Rust to C, though the report does not specify the routines or provide performance or verification results.

At a glance
reportWhen: Project started in 2023; development is…
The developmentA report on Eurydice describes how the project translates Rust source into structured C code, including design trade-offs that matter for verification.

C Output for Verification Workflows

Many high-assurance software projects depend on analysis, verification and compliance systems built around C. Translating Rust into C could let those projects adopt or reuse Rust code without first replacing their established toolchains. It may also offer a path for platforms that have a C compiler but lack a usable Rust compiler.

The value depends on more than whether the output compiles. Verification can be sensitive to program structure and precise behavior, so preserving evaluation order and type-related details may affect whether an analysis of the C code corresponds to the Rust source. Eurydice’s design is intended to address that concern, but the report describes a technical approach—not evidence that every generated program is formally equivalent or accepted by a given assurance process.

For teams evaluating the tool, the practical question is whether its generated C can fit their existing review and verification workflow, with the relevant restrictions understood. The translation can reduce a tooling barrier, but it does not remove the need to check the output, compiler settings and project-specific assurance requirements.

Amazon

C code analysis tools for verification

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Aeneas and Earlier C Translators

Eurydice is part of a broader shift away from Rust relying on a single compiler implementation. The LWN report names mrustc, GCC’s Rust support, rust_codegen_gcc and Cranelift as other projects that have advanced Rust compiler diversity. Eurydice has a different emphasis: rather than primarily targeting machine code, it aims to produce C source that people and C-based tools can inspect.

The project builds on an established idea. The KaRaMeL project, which Eurydice is based on, translates the F* programming language into C. F* is used in developing cryptographic libraries, and translating verified F* programs to C allows them to be used in software environments that depend on C. Eurydice applies a related approach to Rust, within Aeneas’s work on tools associated with formal verification.

Eurydice includes code under both the MIT and Apache-2.0 licenses, according to the report. Its contributor base and relationship to Aeneas provide development context, but the source material does not describe a commercial release or a formal certification of generated code.

“Eurydice has a more ambitious goal: converting Rust code to clean C code.”

— LWN.net report

Amazon

Rust to C translation software

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Limits of the Generated C

The report does not establish how broadly Eurydice supports Rust, how mature its implementation is, or how its output performs across real-world projects. It cites use on some post-quantum cryptography routines but gives no names, measurements, independent validation or deployment details. Whether a particular output satisfies a project’s assurance or compliance requirements remains a matter for that project’s tools and review process.

Some Rust features need substantial translation. Iterator-based loops, for example, may become C while-loops supported by Eurydice runtime code. Rust generics have no direct C equivalent, so generic code must be monomorphized—expanded into implementations for particular types—which can produce repeated code where C programmers might instead use macros or void pointers.

Dynamically sized types pose a more subtle issue. Rust can sometimes know a field’s size in a particular use even when the general type allows an unsized field. That knowledge can affect whether bounds checks are needed. Eurydice emits separate representations for the dynamically sized form and the known-length form; converting between them has no runtime effect, but the report says it technically violates C’s strict-aliasing rule. The recommended compiler option is a constraint users need to account for.

Amazon

high-assurance software verification tools

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Further Testing and Adoption

The next practical test for Eurydice is whether developers can apply it to additional Rust codebases and verify that generated C behaves as intended under their existing toolchains. The source material does not announce a release date, roadmap milestone or planned certification, so none can be stated here.

Teams considering the project will need to examine which Rust constructs their code uses, how the generated C interacts with support code, and whether their compiler configuration follows the aliasing guidance. Further published examples, compatibility details and independent verification results would help clarify where Eurydice is ready for use and where its translation model needs more work.

Amazon

structured C code generators

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Key Questions

What does Eurydice do?

Eurydice translates Rust code into C, using an intermediate representation and transformation passes. It aims to keep the source program’s structure visible in the output.

Why translate Rust into C?

Some high-assurance projects rely on verification and compliance tools built for C. C output may also help on systems that have a C compiler but no working Rust compiler.

Is Eurydice output ordinary, hand-written C?

Not necessarily. The output can preserve Rust’s structure using generated temporary variables and support code. Whether it is readable or idiomatic is subjective, and some Rust features require specialized translation.

What limitations does the report identify?

Rust generics must be monomorphized, iterator-based loops can require support code, and dynamically sized types require multiple representations. The latter introduces a C strict-aliasing concern; the report recommends compiling generated code with -fno-strict-aliasing.

Has Eurydice been used on real software?

The report says it has been used to translate some post-quantum cryptography routines. It does not name those routines or provide performance, deployment or verification results.

Source: hn

COLUMBUS DAY / I

Columbus Day / Indigenous Peoples' Day Picks

As an affiliate, we earn on qualifying purchases.

You May Also Like

Automated Testing Tools: A Prime Big Deal Days Guide

Learn what automated testing tools check, how to choose one, and where to start without drowning your team in flaky tests.

Best Automated Testing Tools Compared

Compare Selenium and Playwright on browser coverage, reliability, setup, ecosystem, and cost to choose the right tool for your test suite.

How to Choose Software Testing Tools For Halloween-Themed Projects

Set up functional, visual, and performance tests for a Halloween-themed app or site using Playwright, Jest, Lighthouse, and more.

How AI Agents Helped Deliver Gewerkton’s New Look In Two Days

Construction documentation app Gewerkton says AI coding agents implemented its HORIZON redesign across apps and a 40-language website on Oct. 2-3.