24 releases (9 breaking)
Uses new Rust 2024
| new 0.11.0 | Apr 3, 2026 |
|---|---|
| 0.10.1 | Mar 13, 2026 |
| 0.9.1 | Feb 18, 2026 |
#9 in #double-entry
154 downloads per month
Used in 4 crates
(3 directly)
1MB
17K
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
includedirective resolution - Option parsing and validation
- Plugin directive collection
- Binary cache for faster subsequent loads
- Path traversal protection
Example
use rustledger_loader::{Loader, LoadOptions};
use std::path::Path;
// Simple loading (raw parse without processing)
let result = Loader::new().load(Path::new("ledger.beancount"))?;
println!("Loaded {} directives", result.directives.len());
// With full processing (booking, plugins, validation)
use rustledger_loader::load;
let ledger = load(Path::new("ledger.beancount"), &LoadOptions::default())?;
println!("Processed {} directives", ledger.directives.len());
Cargo Features
cache(default) - Enable rkyv-based binary caching for faster loads
License
GPL-3.0
Dependencies
~10–34MB
~551K SLoC