Universal Transpiler
BRIK-64 is the first N-to-N transpiler: any of 10 input languages → PCD → any of 14 output targets, with mathematical certification (Φ_c = 1) that the output is equivalent to the input.
What Makes It Universal
Traditional transpilers are 1-to-1: TypeScript→JavaScript, CoffeeScript→JavaScript, Babel. Each one is purpose-built for a single language pair.
BRIK-64 uses PCD (Printed Circuit Description) as a universal intermediate representation. The Lifter extracts computational logic from source code into PCD blueprints. The backends emit idiomatic code from those blueprints into any target language.
Source code (10 languages) → Lifter → PCD Blueprint → Certification → Backend → Target (14 languages)
10 frontends + 14 backends = 140 transpilation paths with N+M effort instead of N×M.
The Command
brikc transpile ./src/ --to rust --output ./dist/
This scans the source directory, lifts all files to PCD, certifies each circuit, and emits target code.
Supported Languages
| Language | Extensions | Status |
|---|
| JavaScript | .js, .mjs, .cjs | Available |
| TypeScript | .ts, .tsx, .jsx | Available |
| Python | .py | Available |
| Rust | .rs | Available |
| C | .c, .h | Available |
| C++ | .cpp, .cc, .cxx | Available |
| Go | .go | Available |
| COBOL | .cob, .cbl | Available |
| PHP | .php | Available |
| Java | .java | Available |
Output (14 targets)
| Target | Flag | Extension |
|---|
| Rust | --to rust | .rs |
| JavaScript | --to js | .js |
| TypeScript | --to typescript | .ts |
| Python | --to python | .py |
| C | --to c | .c |
| C++ | --to cpp | .cpp |
| Go | --to go | .go |
| COBOL | --to cobol | .cob |
| PHP | --to php | .php |
| Java | --to java | .java |
| Swift | --to swift | .swift |
| WebAssembly | --to wasm32 | .wat |
| BIR Bytecode | --to bir | .bir |
| Native Binary | --to native | (executable) |
Pipeline
The transpile command executes a 5-step pipeline:
- SCAN — Find all source files in the input directory
- LIFT — Convert each file to PCD blueprints using the appropriate frontend
- CHECK — Certify each PCD with the TCE (Φ_c verification)
- BUILD — Generate target language code using the appropriate backend
- REPORT — Print a migration summary with certification statistics
Example: COBOL to Go
brikc transpile ./cobol-banking/ --to go --output ./modern-go/
Output:
⚡ BRIK-64 TRANSPILE: ./cobol-banking/ → go
→ Step 1: SCAN — finding source files...
✓ Found 5 source files
→ Step 2: LIFT — converting to PCD...
✓ interest.cob — 1 circuits
✓ tax.cob — 1 circuits
✓ loan.cob — 1 circuits
→ Step 3: CHECK — certifying PCDs...
✓ interest.pcd — Φ_c = 1
✓ tax.pcd — Φ_c = 1
✓ loan.pcd — Φ_c = 1
→ Step 4: BUILD — generating go output...
✓ interest.cob → interest.go
✓ tax.cob → tax.go
✓ loan.cob → loan.go
╔═══════════════════════════════════════════╗
║ Files: 5 scanned, 5 transpiled ║
║ Functions: 5 lifted, 5 certified (100%) ║
║ Output: ./modern-go/ (5 files) ║
╚═══════════════════════════════════════════╝
The transpiler currently handles pure functions, conditionals, loops, and basic array/object operations at full fidelity. Complex patterns (async/await, generics, inheritance) are in development.