Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Transpilation Failures

Transpilation failures occur in Phase 2 when source code cannot be converted to Rust. The three main categories are missing tools, unsupported features, and dependency resolution failures.

Missing Tool Detection

# Check all transpilers
batuta analyze --check-tools
LanguageTranspilerInstall Command
Pythondepylercargo install depyler
C/C++decycargo install decy
Shellbashrscargo install bashrs

Unsupported Language Features

Python

FeatureStatusWorkaround
eval() / exec()UnsupportedRefactor to static code
getattr (dynamic)PartialUse enum dispatch
Multiple inheritanceUnsupportedTrait composition
*args, **kwargsPartialExplicit params or builder
async/awaitSupportedMaps to tokio async

C

FeatureStatusWorkaround
gotoUnsupportedRefactor to loops/match
Pointer arithmeticPartialSlice indexing
Variadic functionsPartialMacro or builder
setjmp/longjmpUnsupportedResult error handling

Dependency Resolution Failures

Batuta maps source dependencies to Rust crate equivalents:

Python PackageRust CrateNotes
numpytruenoStack native
scikit-learnaprenderStack native
torchrealizarInference only
pandaspolars / alimentaralimentar for Arrow
requestsreqwestAsync HTTP
flaskaxumAsync web framework

When Mapping Fails

Batuta halts with a Jidoka stop. Options:

  1. Add manual mapping in batuta.toml
  2. Wrap via FFI (keep the original library)
  3. Implement directly in Rust
[dependencies.mapping]
obscure_lib = { crate = "my-rust-alternative", version = "0.1" }

Navigate: Table of Contents