Skip to main content

Spring Batch RS

A toolkit for building enterprise-grade batch applications in Rust

Build robust, scalable batch processing applications with Rust's performance and safety. Inspired by Spring Batch, designed for modern enterprise workloads.

Quick Example
use spring_batch_rs::prelude::*;

#[derive(Deserialize, Serialize)]
struct Product {
    id: u32,
    name: String,
    price: f64,
}

fn main() -> Result<(), BatchError> {
    let reader = CsvItemReaderBuilder::<Product>::new()
        .has_headers(true)
        .from_path("products.csv");

    let writer = JsonItemWriterBuilder::new()
        .pretty(true)
        .from_path("output.json");

    let processor = PassThroughProcessor::<Product>::new();

    let step = StepBuilder::new("csv_to_json")
        .chunk::<Product, Product>(100)
        .reader(&reader)
        .processor(&processor)
        .writer(&writer)
        .build();

    let job = JobBuilder::new()
        .start(&step)
        .build();
        
    job.run()
}
🚀
High Performance
Built with Rust for maximum performance and memory safety
📊
Enterprise Ready
Production-tested patterns for large-scale batch processing
🔧
Extensible
Modular design with custom readers, writers, and processors
🛡️
Fault Tolerant
Built-in error handling with configurable skip limits
READPROCESSWRITEChunks

Chunk-Oriented Processing

Process large datasets efficiently with the read-process-write pattern. Built-in support for pagination, error handling, and transaction boundaries.

TASKLETFile Operations • Database Tasks • Custom Logic

Tasklet Processing

Execute single tasks like file operations, database maintenance, or custom business logic that don't fit the chunk-oriented model.

BATCHCSVJSONDBXMLMONGO...

Rich Ecosystem

Support for CSV, JSON, XML, MongoDB, PostgreSQL, MySQL, SQLite, and more. Modular design lets you enable only what you need.