beankeeper 0.2.0

Idiomatic, ergonomic library of primitives for professional double-entry accounting
Documentation
  • Coverage
  • 91.58%
    185 out of 202 items documented10 out of 129 items with examples
  • Size
  • Source code size: 128.29 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 12.43 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 23s Average build duration of successful builds.
  • all releases: 22s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Govcraft/beankeeper
    6 0 6
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • rrrodzilla

Beankeeper

Idiomatic, ergonomic library of primitives for professional double-entry accounting.

Core Invariant

Every [core::Transaction] enforces the fundamental accounting equation: total debits must equal total credits.

Quick Start

use beankeeper::prelude::*;

// Create accounts
let cash = Account::new(
    AccountCode::new("1000").unwrap(),
    "Cash",
    AccountType::Asset,
);
let revenue = Account::new(
    AccountCode::new("4000").unwrap(),
    "Sales Revenue",
    AccountType::Revenue,
);

// Build a balanced transaction
let txn = JournalEntry::new("Sale of goods")
    .debit(&cash, Money::usd(500_00))
    .unwrap()
    .credit(&revenue, Money::usd(500_00))
    .unwrap()
    .post()
    .unwrap();

assert_eq!(txn.description(), "Sale of goods");

Crate Structure

  • [types] — Fundamental accounting types (amounts, currencies, accounts, entries)
  • [core] — Transaction building, validation, and the general ledger
  • [reporting] — Trial balances and account balance summaries
  • [error] — Top-level error type aggregating all domain errors