Spydecy - Self-Hosted Python/C-to-Rust Compiler-Debugger
Version 0.1.0 Released ๐ โข EXTREME TDD โข Zero Tolerance SATD โข 50 Tests Passing
Unified Python and C-to-Rust transpilation with introspective debugging capabilities.
๐ฆ Published Crates
| Crate | Version | Description |
|---|---|---|
| spydecy | 0.1.0 | Main CLI application |
| spydecy-hir | 0.1.0 | Unified HIR (High-level IR) |
| spydecy-python | 0.1.0 | Python AST parser (PyO3) |
| spydecy-debugger | 0.1.0 | Introspective debugger |
๐ฏ Quick Start
Installation
From crates.io (Recommended)
# Install the latest release
# Verify installation
For Development
Prerequisites:
- Rust 1.75.0+
- Python 3.10-dev:
sudo apt-get install python3.10-dev - libclang-14-dev:
sudo apt-get install libclang-14-dev - PMAT:
cargo install pmat
# Clone repository
# Install all development tools
# Setup project
# Build
# Run quality gates
Usage
# Visualize Python AST
# Show version
# Get help
๐ Documentation
Start Here: Response to Gemini AI Review โญ
Critical Documents
- Sprint 0: Tracer Bullet - 2-week validation sprint
- Incremental Debugger Roadmap - Build debugger alongside transpiler
- Pluggable C-API Architecture - Extensible C-API analysis
Full Specification
๐งช Quality Standards
| Metric | Target | Enforcement |
|---|---|---|
| Test Coverage | โฅ80% | PMAT + CI |
| Mutation Score | โฅ90% | cargo-mutants |
| Complexity | โค10 CCN | PMAT pre-commit |
| SATD Comments | 0 | PMAT (zero tolerance) |
| Clippy Warnings | 0 | CI/CD |
| Unsafe Code | <5 per 1000 LOC | Static analysis |
๐ Development
Quality Gates
# Fast quality check
# Full quality gate (with coverage & mutation)
# Pre-commit checks
# Continuous improvement analysis
Testing
# Run all tests
# Property-based tests (1000 cases/property)
# Mutation testing
# Code coverage
Development Mode
# Auto-reload on changes
# Watch and run tests
๐๏ธ Project Status
Current Version: v0.1.0 (Released 2025-10-22) Current Phase: Sprint 3 - C Transpiler Foundation
Completed Milestones โ
- โ
Sprint 0: Tracer Bullet Validation - Core assumption proven:
len()unification works! - โ Sprint 2: Python Transpiler - Full Python AST parsing with PyO3 (7/7 tests)
- โ
v0.1.0 Release: Published to crates.io with 50 passing tests
- spydecy-hir: Unified HIR foundation
- spydecy-python: Python parser working
- spydecy-debugger: Introspective debugger
- spydecy: Main CLI application
In Progress ๐ง
- โณ Sprint 3: C Transpiler Foundation
- โ C parser complete (11/11 tests)
- โ CPython API pattern recognition
- โณ First unification tests (Python + C โ Rust)
- โณ C debugger visualization
Roadmap
- v0.2.0 (Est. 2 weeks): Complete unification - First Python + C โ Rust tests working
- v0.3.0 (Est. 4 weeks): Cross-layer optimization - Boundary elimination
- v0.4.0 (Est. 8 weeks): Full code generation pipeline
- v1.0.0 (Est. 12 weeks): Production ready - Self-hosting capability
See RELEASE-v0.1.0.md for detailed release notes.
๐ฌ Architecture
Multi-Layer Pipeline
Python Source โ Python HIR โโ
โโโ Unified HIR โ Optimizer โ Rust
C Source โ C HIR โโโโโโโโโโโโ
Key Innovations
- Unified Python/C Transpilation - Leverages CPython's C implementation
- Introspective Debugging - Step through transpilation process
- Pluggable C-API - CPython, NumPy, SciPy, community plugins
- Self-Hosting - Compiler transpiles itself for validation
๐ Makefile Targets
๐ค Contributing
Development Methodology: EXTREME TDD
- RED: Write failing tests first
- GREEN: Minimal implementation
- REFACTOR: Meet quality gates (โค10 CCN, 0 SATD, 80%+ coverage)
Quality Requirements
- โ All tests pass
- โ Coverage โฅ80%
- โ Mutation score โฅ90%
- โ Complexity โค10 CCN
- โ Zero SATD comments (TODO/FIXME/HACK)
- โ Zero Clippy warnings
- โ Code formatted with rustfmt
Pre-Commit Hooks
Pre-commit hooks automatically enforce quality gates:
- Code formatting
- Clippy lints
- PMAT complexity & SATD checks
- Fast test suite
๐ License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT license (LICENSE-MIT)
at your option.
๐ Acknowledgments
Inspired by:
- depyler: Python-to-Rust transpiler
- decy: C-to-Rust transpiler with extreme quality
- bashrs: Formal verification and property testing
- ruchy: Self-hosting and PMAT integration
- Toyota Production System: Jidoka, Kaizen, Genchi Genbutsu
Built with EXTREME quality standards. Zero compromises. ๐
Status: v0.1.0 Released to crates.io โ Current: Sprint 3 - C Transpiler Foundation Next: v0.2.0 - First Python + C unification tests
๐ฆ Install now: cargo install spydecy
๐ Documentation: RELEASE-v0.1.0.md
๐ Crates.io: https://crates.io/crates/spydecy