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

Supported Languages

Batuta supports transpilation from multiple source languages to Rust.

Source Languages

LanguageTranspilerStatusFeatures
PythonDepyler✅ StableType inference, NumPy/sklearn/PyTorch
ShellBashrs✅ StablePOSIX compliance, formal verification
C/C++Decy🔄 BetaMemory safety, ownership inference

Python Support (Depyler)

Supported Constructs

  • Functions and classes
  • Type annotations (PEP 484)
  • List/dict/set comprehensions
  • Context managers (with statements)
  • Decorators
  • Async/await

ML Library Mappings

PythonRust Equivalent
numpytrueno
sklearnaprender
torchrealizar
pandaspolars (via trueno)

Shell Support (Bashrs)

Supported Features

  • Variable assignment and expansion
  • Control flow (if/else, for, while, case)
  • Functions
  • Pipelines and redirections
  • Command substitution
  • Arrays

Shell Compatibility

ShellSupport Level
POSIX shFull
Bash 4.xFull
Bash 5.xFull
ZshPartial

C/C++ Support (Decy)

Supported Constructs

  • Functions and structs
  • Pointers (with ownership inference)
  • Arrays and strings
  • Memory allocation/deallocation
  • Header file parsing

Safety Analysis

Decy performs automatic safety analysis:

  • Buffer overflow detection
  • Use-after-free detection
  • Memory leak detection
  • Null pointer dereference

Target: Rust

All transpilation targets modern Rust (2021 edition) with:

  • Full type safety
  • Memory safety guarantees
  • Zero-cost abstractions
  • No unsafe code (where possible)

Navigate: Table of Contents