⬡
Ferrous Bridge
Papers
GitHub
☰ Contents
Contents
1.1 The c2rust gap
1.2 Why libyaml is the perfect first instance
1.3 Contributions
1.4 Audience and scope
2.1 What c2rust does
2.2 What c2rust gets right
2.3 What c2rust leaves on the table
3.1 Refinement relations
3.2 The chain
3.3 Inference rules
3.4 Diagram
4.1 Pattern 1: raw *mut T field → owned/borrowed Rust
4.2 Pattern 2: index loop → iterator combinator
4.3 Pattern 3: char * → &str / String / Cow<’_, str>
4.4 Pattern 4: malloc/free → Box::new/drop
4.5 Pattern 5: int return + out-pointer → Result<T, E>
4.6 Pattern 6: tagged C union → Rust enum
4.7 Pattern 7: linked list of structs → Vec<T> with indices
4.8 Pattern 8: function-pointer callback + void * context → closure
4.9 Pattern 9: nullable pointer → Option<T>
4.10 Pattern 10: integer-coded error → thiserror variant
4.11 Pattern 11: self-referential struct → lifetime-parameterized helper
4.12 Pattern 12: stack/queue macros → Vec<T>/VecDeque<T>
5.1 Formalization
5.2 Harness design
5.3 Tooling tradeoffs
6.1 What Miri sees
6.2 What Miri does not see
6.3 cargo-careful as runtime complement
7.1 Selecting Fcrit
7.2 The libyaml STRING_EXTEND invariant
7.3 The Rust port
7.4 The Kani harness
Day 1 — Reader, writer, internals
Day 2 — API surface and event constructors
Day 3 — Scanner sections 7, 1, 2
Day 4 — Scanner sections 6, 3
Day 5 — Scanner sections 4, 5; parser begins
Day 6 — Parser, loader, emitter (start)
Day 7 — Emitter, dumper, verification
8.1 Empirical basis for the 7-day target
9.1 What carries over
9.2 What is new
9.3 Estimated timeline
11.1 The role of formal proof
11.2 Limits of differential fuzzing
11.3 Performance
11.4 Failure modes and exit criteria
11.5 Cost breakdown
A.1 Agent roster (translation and verification phase only)
A.2 Task list (36 tasks)
A.3 Day-by-day schedule (recap)
A.4 Exact CLI invocations (cheat sheet)
A.5 Gantt chart of the 7-day schedule
Part III
Automated C → Rust Transpiling: From c2rust's Raw Lift to Safe, Idiomatic Rust via the Safety Ladder
35 pages
cs.PL
DOI: 2026.04.c-rust-transpiling
← Previous
Idiomatic Safe Rust as a Translation Target: Ownership, Lifetimes, and ABI-Compatible Parser Design
Next →
Ferrous Bridge: A C → Rust Automated Agent Orchestration Pipeline with Type Checks and Safety Guarantees
⤓ PDF