| Crates.io | spydecy |
| lib.rs | spydecy |
| version | 0.3.0 |
| created_at | 2025-10-22 10:21:53.853205+00 |
| updated_at | 2025-10-23 15:40:58.470581+00 |
| description | Self-hosted Python/C-to-Rust compiler-debugger with introspective debugging |
| homepage | |
| repository | https://github.com/noahgift/spydecy |
| max_upload_size | |
| id | 1895411 |
| size | 492,893 |
๐ MVP-READY โข Phase 2 Complete (80%) โข Zero Overhead Proven โข 28 Tests Passing (100%)
Self-hosted Python/C-to-Rust transpiler with zero FFI overhead, zero unsafe code, and user-friendly error messages. Generate idiomatic, safe Rust from Python/C extensions.
Production-Ready Features:
my_list.len() not x.len())| Crate | Version | Description |
|---|---|---|
| spydecy | 0.2.0 | Main CLI application |
| spydecy-hir | 0.2.0 | Unified HIR (High-level IR) |
| spydecy-python | 0.2.0 | Python AST parser (PyO3) |
| spydecy-debugger | 0.2.0 | Introspective debugger |
# Install the latest release
cargo install spydecy
# Verify installation
spydecy --version
Prerequisites:
sudo apt-get install python3.10-devsudo apt-get install libclang-14-devcargo install pmat# Clone repository
git clone https://github.com/noahgift/spydecy.git
cd spydecy
# Install all development tools
make install-tools
# Setup project
make setup
# Build
make build
# Run quality gates
make quality-gate
# Compile Python + C to Rust (full pipeline)
spydecy compile --python my_file.py --c my_file.c --output my_file.rs --verbose
# Quick compile (non-verbose)
spydecy compile --python my_file.py --c my_file.c --output my_file.rs
# Visualize Python AST (NEW!)
spydecy debug --visualize example.py
# Visualize C AST with CPython API detection (NEW!)
spydecy debug --visualize example.c
# Show project info and status
spydecy info
# Get help
spydecy --help
Proven on 8 realistic scenarios:
# E-commerce: Shopping cart
def add_to_cart(shopping_cart):
return append(shopping_cart)
# โ shopping_cart.push(item) โ
Actual variable name!
# Analytics: User history
def reverse_user_history(user_history):
return reverse(user_history)
# โ user_history.reverse() โ
Domain-specific naming preserved!
# Config: Settings lookup
def get_config_value(config_map):
return get(config_map)
# โ config_map.get(&key) โ
Idiomatic Rust!
Target EXCEEDED: 0-6% overhead (target was <20%)
| Operation | Hand-Written | Spydecy | Difference |
|---|---|---|---|
| HashMap::get(1000) | 18.449 ns | 18.699 ns | +1.35% โ |
| Vec::clear(1000) | 118.90 ns | 118.72 ns | -0.15% โ |
| Vec::pop(1000) | 92.260 ns | 91.581 ns | -0.74% โ |
Result: Generated code performs identically to hand-written Rust!
User-friendly diagnostics with pattern suggestions:
โ Cannot match Python function 'unknown' with C function 'unknown_c'
๐ก Supported patterns:
1. len() + list_length() โ Vec::len()
2. append() + PyList_Append() โ Vec::push()
3. get() + PyDict_GetItem() โ HashMap::get()
๐ For custom patterns, see: https://github.com/noahgift/spydecy
Real variable names flow from Python to Rust:
item_list โ item_list.len() (not generic x.len())shopping_cart โ shopping_cart.push(item)config_map โ config_map.get(&key)Architecture: decy-parser โ adapter โ spydecy CAST โ Unified HIR โ Rust
Start Here: Response to Gemini AI Review โญ
| Metric | Target | Current | Enforcement |
|---|---|---|---|
| Test Coverage | โฅ80% | 99/99 โ | PMAT + CI |
| Mutation Score | โฅ90% | TBD | cargo-mutants |
| Complexity | โค10 CCN | โ | PMAT pre-commit |
| SATD Comments | 0 | 0 โ | PMAT (zero tolerance) |
| Clippy Warnings | 0 | CI/CD | |
| Unsafe Code | <5 per 1000 LOC | Static analysis |
# Fast quality check
make quality-fast
# Full quality gate (with coverage & mutation)
make quality-gate
# Pre-commit checks
make pre-commit
# Continuous improvement analysis
make kaizen
# Run all tests
make test
# Property-based tests (1000 cases/property)
make test-property
# Mutation testing
make mutants
# Code coverage
make coverage
# Auto-reload on changes
make dev
# Watch and run tests
make watch
Current Version: v0.2.0 (Released 2025-10-22) Current Phase: Sprint 3 Complete โ - Planning Sprint 4
len() unification works!len(x) + C list_length() โ Rust Vec::len() workingSee CHANGELOG.md for detailed release notes.
Python Source โ Python HIR โโ
โโโ Unified HIR โ Optimizer โ Rust
C Source โ C HIR โโโโโโโโโโโโ
make help # Show all available targets
make install-tools # Install all dev tools (PMAT, etc.)
make quality-gate # Run full quality gate suite
make kaizen # Continuous improvement analysis
make ci # Full CI pipeline
Pre-commit hooks automatically enforce quality gates:
Licensed under either of:
at your option.
Spydecy is part of a family of transpiler projects:
Inspired by:
Built with EXTREME quality standards. Zero compromises. ๐
Status: v0.2.0 Released to crates.io โ Achievement: ๐ Core Innovation Proven End-to-End Current: Sprint 3 Complete - Planning Sprint 4 Next: v0.3.0 - Expanded patterns + optimizer
๐ฆ Install now: cargo install spydecy
๐ Documentation: CHANGELOG.md
๐ Crates.io: https://crates.io/crates/spydecy