#finance-ledger #ledger #beancount #double-entry #accounting

rustledger-loader

Beancount file loader with include resolution and options parsing

20 releases (7 breaking)

Uses new Rust 2024

new 0.9.0 Feb 17, 2026
0.8.1 Jan 29, 2026

#10 in #double-entry

Download history 47/week @ 2026-01-13 97/week @ 2026-01-20 73/week @ 2026-01-27 25/week @ 2026-02-03

242 downloads per month
Used in 4 crates (3 directly)

GPL-3.0-only

755KB
16K SLoC

Beancount file loader with include resolution.

This crate handles loading beancount files, resolving includes, and collecting options. It builds on the parser to provide a complete loading pipeline.

Features

  • Recursive include resolution with cycle detection
  • Options collection and parsing
  • Plugin directive collection
  • Source map for error reporting
  • Push/pop tag and metadata handling
  • Automatic GPG decryption for encrypted files (.gpg, .asc)

Example

use rustledger_loader::Loader;
use std::path::Path;

let result = Loader::new().load(Path::new("ledger.beancount"))?;
for directive in result.directives {
    println!("{:?}", directive);
}

rustledger-loader

Beancount file loader with include resolution, options parsing, and binary caching.

Features

  • Recursive include directive resolution
  • Option parsing and validation
  • Plugin directive collection
  • Binary cache for faster subsequent loads
  • Path traversal protection

Example

use rustledger_loader::load_file;

let result = load_file("ledger.beancount")?;

println!("Loaded {} directives", result.directives.len());
println!("Options: {:?}", result.options);
println!("Errors: {:?}", result.errors);

Cargo Features

  • cache (default) - Enable rkyv-based binary caching for faster loads

License

GPL-3.0

Dependencies

~11–35MB
~558K SLoC