moxin-org/C2Rust

VISIONConcurrent Unit Cost:2Model Size:27BQuant:FP8Context Size:32kTool Calling:SupportedPublished:Aug 3, 2026License:apache-2.0Architecture:Transformer Open Weights Featherless Exclusive Cold

C2Rust by moxin-org is a 27 billion parameter BF16 fine-tune of Qwen3.5-27B, specifically designed for translating C programs into behaviorally equivalent Rust code. It utilizes a three-stage training curriculum and an execution-based SACTOR harness for evaluation. This model excels at C-to-Rust translation, achieving an 87.30% success rate, outperforming several larger models in this specialized task.

Loading preview...

Overview

moxin-org's C2Rust is a 27 billion parameter model, fine-tuned from Qwen3.5-27B, dedicated to translating C programs into Rust. It employs a full-parameter BF16 fine-tuning approach and is evaluated using an execution-based SACTOR harness that verifies behavioral equivalence by compiling and testing the translated Rust code against the original C program.

Key Capabilities

  • High C-to-Rust Translation Success Rate: Achieves an 87.30% success rate, significantly improving the Qwen3.5-27B baseline by 15 percentage points for this specific task. It surpasses models like Qwen3.5-Plus, MiniMax-M2.5, and GLM-5 in C-to-Rust translation.
  • Three-Stage Training Curriculum: The model is trained through a specialized curriculum:
    • Rust continued pretraining: Enhances Rust syntax, idioms, completion, and library knowledge.
    • Debugging-aware SFT: Teaches the model to interpret structured verifier feedback and perform targeted repairs.
    • C2Rust task SFT: Focuses on direct C-to-Rust semantic translation.
  • Strong General Coding Performance: Despite specialization, C2Rust maintains robust general software engineering capabilities, scoring 70.6 on SWE-bench Verified pass@1, only slightly below the untuned Qwen3.5-27B base model's 72.4.

Good For

  • Research and Experimentation in C-to-Rust Translation: Ideal for developers and researchers exploring automated code migration from C to Rust.
  • Generating Rust Equivalents of C Programs: Useful for initial translation drafts, though generated code requires review for semantic equivalence, memory safety, and idiomatic Rust practices.

Limitations

  • Translations are not guaranteed to be semantically equivalent, memory-safe, or secure without human review.
  • The default evaluation permits unsafe Rust and prioritizes behavior preservation over idiomaticity.
  • There is a modest specialization cost, with a slight reduction in general coding performance compared to the base model.