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

Tool Overview

Batuta does not transpile code itself. It orchestrates a curated ecosystem of external tools, each purpose-built for a specific language or task. Tools are organized into three categories: transpilers that convert source languages to Rust, foundation libraries that provide compute and ML primitives, and support tools that handle analysis, testing, and tracing.

Tool Categories

Transpilers

Transpilers convert source code from one language to idiomatic Rust. Batuta selects the appropriate transpiler based on the detected source language.

ToolDirectionInstallStatus
DepylerPython to Rustcargo install depylerProduction
DecyC/C++ to Rustcargo install decyProduction
BashrsRust to Shellcargo install bashrsProduction

Foundation Libraries

Foundation libraries are Rust crates used as dependencies in generated code. They replace source-language libraries with SIMD/GPU-accelerated Rust equivalents.

LibraryPurposecrates.io
TruenoSIMD/GPU compute primitives (AVX2, AVX-512, NEON, wgpu)trueno
AprenderML algorithms, APR v2 model formataprender
RealizarInference runtime with quantized kernelsrealizar
RepartirDistributed compute (CPU, GPU, remote)repartir
Trueno-zramSIMD-accelerated compression (LZ4, ZSTD)trueno-zram-core
Whisper.aprPure Rust speech recognitionwhisper-apr

Support Tools

Support tools assist with quality analysis, runtime validation, and scripting.

ToolPurposeInstall
PMATStatic analysis and TDG scoringcargo install pmat
RenacerSyscall tracing for semantic validationcargo install renacer
RuchyRust scripting for automationcargo install ruchy

Tool Detection

Batuta discovers tools automatically at startup using PATH-based detection. The ToolRegistry struct in src/tools.rs drives this process:

#![allow(unused)]
fn main() {
// Batuta scans PATH for each known tool
let registry = ToolRegistry::detect();

// Check what is available
for tool in registry.available_tools() {
    println!("Found: {}", tool);
}
}

Detection follows three steps:

  1. PATH lookupwhich::which(name) locates the binary
  2. Version probe – runs tool --version and parses the output
  3. Registry population – stores name, path, version, and availability flag

If a tool is missing, Batuta provides installation instructions:

$ batuta analyze --input project/
Warning: Depyler not found. Install with: cargo install depyler

Language-to-Tool Mapping

When Batuta encounters source files, it maps the detected language to the appropriate transpiler:

Source LanguageTranspilerGenerated Dependencies
PythonDepylertrueno, aprender, realizar
C / C++Decy(pure Rust output)
ShellBashrs(POSIX shell output)
Rust(no transpilation)

Languages without a matching transpiler are reported but not processed. Batuta never guesses – if the right tool is not installed, the pipeline stops with a clear error (Jidoka principle).

Checking Tool Status

# List all detected tools
batuta analyze --tools

# Install all stack tools at once
cargo install depyler decy bashrs pmat renacer ruchy

Navigate: Table of Contents