Release Date: January 2025
- 99.9% Test Pass Rate - 1,391 tests passing
- 95% Code Coverage - Comprehensive test suite
- DECY-220: Fixed malloc cast expression handling (
(int*)malloc(n)→Vec<T>) - Portable Tests: All test paths use
CARGO_MANIFEST_DIR - System Include Discovery: Automatic detection of
stdlib.h,string.h
cargo install decy# Transpile a C file to Rust
decy transpile input.c -o output.rs
# Transpile an entire project
decy transpile-project src/ -o rust_output/
# Audit unsafe code
decy audit output.rsExample:
// input.c
int add(int a, int b) {
return a + b;
}decy transpile input.c// Generated Rust (no unsafe!)
fn add(a: i32, b: i32) -> i32 {
a + b
}| Metric | Score | Target |
|---|---|---|
| Rust Project Score | 92.9% (A+) | 90%+ |
| Repository Health | 84.5/100 (B+) | 80+ |
| Test Coverage | 95.1% | 80%+ |
| Test Pass Rate | 99.9% | 100% |
| Clippy Warnings | 0 | 0 |
Run quality analysis:
pmat rust-project-score
pmat repo-score
pmat analyze complexitycargo install decygit clone https://github.com/paiml/decy.git
cd decy
make install # Installs Rust + LLVM/Clang
cargo install --path crates/decy- Rust: 1.70+ (stable)
- LLVM/Clang: 14+ (for C parsing)
- Platform: Linux, macOS, Windows (WSL2)
# Single file
decy transpile input.c -o output.rs
# Project with caching (10-20x faster on unchanged files)
decy transpile-project src/ -o rust_output/
decy cache-stats src/# Visualize C AST
decy debug --visualize-ast input.c
# Visualize ownership inference
decy debug --visualize-ownership input.c
# Step-through debugging
decy debug --step-through input.c# Audit unsafe blocks
decy audit output.rs --verbose
# Generate verification book
decy verify --book-output ./book# Start MCP server for Claude Code
decy mcp-server --port 3000C Source → Parser → HIR → Analyzer → Ownership → Codegen → Rust
│ │ │ │ │
clang Rust-IR Types &T/&mut T Safe code
| Crate | Description |
|---|---|
decy-parser |
C AST parsing (clang-sys) |
decy-hir |
High-level IR (Rust-oriented) |
decy-analyzer |
Static analysis, type inference |
decy-ownership |
Ownership inference (pointers → references) |
decy-codegen |
Rust code generation |
decy-verify |
Safety verification |
decy-debugger |
AST/HIR visualization |
decy |
CLI binary |
Decy uses a 4-phase approach to minimize unsafe code:
| Phase | Reduction | Technique |
|---|---|---|
| 1. Pattern-Based | 100% → 50% | malloc/free → Box, arrays → Vec |
| 2. Ownership | 50% → 20% | Infer &T, &mut T from usage |
| 3. Lifetime | 20% → 10% | Infer <'a, 'b> annotations |
| 4. Safe Wrappers | 10% → <5% | Generate safe abstractions |
Target: <5 unsafe blocks per 1000 LOC
# RED: Write failing tests
git commit -m "[RED] DECY-XXX: Add failing tests"
# GREEN: Minimal implementation
git commit -m "[GREEN] DECY-XXX: Implement feature"
# REFACTOR: Meet quality gates
git commit -m "[REFACTOR] DECY-XXX: Clean up"make quality-gates # Run all checks
make test # Run tests
make coverage # Generate coverage reportcargo test --workspace # All tests
cargo test -p decy-ownership # Single crate
cargo llvm-cov --workspace # Coverage- Getting Started - Developer guide
- Specification - Technical spec
- Unsafe Strategy - How we reduce unsafe
- Roadmap - Development plan
MIT OR Apache-2.0
- C2Rust - Mozilla's C-to-Rust transpiler
- PMAT - Quality metrics toolkit
- Toyota Production System - Quality principles
Built with EXTREME quality standards