# immunant/c2rust

Migrate C code to Rust

Repository: https://github.com/immunant/c2rust
Canonical: https://ross.abutalabs.com/products/c2rust
Homepage: https://c2rust.com/
Language: Rust
License: NOASSERTION
License Family: other
Topics: transpiler, rust, security-hardening, migration, translation, memory-safety
Last push: 2026-08-25T21:40:29+00:00

## Health v2 (maintenance only)
Score: 81/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 46, longevity 100
- inputs: {"age_days": 3058, "days_push": 8, "days_rel": 203, "gap_med": 120, "n_releases_24m": 4}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4794, forks 312 (observed 2026-08-28T04:09:00.028040+00:00)

## What it is
C2Rust is a transpiler that converts C99-compliant C code into semantically equivalent but unsafe, unidiomatic Rust code, preserving functionality so existing test suites continue to pass. It includes additional tooling for refactoring, LLM-assisted postprocessing, and cross-checking translated code against the original as part of a longer migration workflow.

## Use cases
- translate a C99 codebase to Rust
- migrate legacy C projects to Rust for memory safety
- convert C modules into compilable Rust source files
- cross-check translated Rust against original C behavior
- bootstrap a C-to-Rust migration before manual or LLM-driven cleanup

## When to choose
- you need an automated first step for migrating C99 code to Rust
- you want to preserve functionality and keep existing tests passing during translation
- you need tooling to refactor or postprocess generated unsafe Rust

## When to avoid
- you expect safe, idiomatic Rust output without further work
- your C code relies on non-C99 extensions or platform-specific behavior
- you need a fully automated one-click conversion with no manual follow-up

## Facets
- artifact type: cli-tool
- maturity: active
- function: compiler, parser, developer-tools, security
- domain: developer-tools, programming-languages, security
- platform: cli, rust
- tags: transpiler, c-to-rust, memory-safety, code-migration, c99, refactoring, cross-checking, automation, linux, macos

## Member repositories
- immunant/c2rust (main) score 81

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:00.028040+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:18:40.614057+00:00, confidence not recorded.
  - readme: https://github.com/immunant/c2rust (fetched 2026-08-28T04:09:00.028040+00:00, sha 9cb82d185010)
  - homepage: https://c2rust.com/ (fetched 2026-08-29T09:01:46.917448+00:00, sha b52292f12e3f)
  - registry_crates: https://crates.io/api/v1/crates/c2rust (fetched 2026-08-29T09:01:46.919839+00:00, sha 406de22a10d9)
- Data as of 2026-08-30T08:39:29.467469+00:00.
