尚未收集仓库信息。
尚未检测到更新。GitHub 发布版本后会显示在这里。
制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗Cala is a robust ledger library developed by Galoy, designed to handle complex financial transactions and accounting operations. It provides a flexible and scalable solution for managing financial records with strong consistency guarantees.
Cala is distributed as a Rust library that you embed in your own service — it does not run as a standalone server.
cala-ledger crateAdd the dependency to your Cargo.toml:
[dependencies]
cala-ledger = "0.20"
Then initialize the ledger with a PostgreSQL connection pool:
use cala_ledger::{CalaLedger, CalaLedgerConfig};
let pool = sqlx::postgres::PgPoolOptions::new()
.max_connections(20)
.connect("postgres://user:password@localhost:5432/pg")
.await?;
let cala_config = CalaLedgerConfig::builder()
.pool(pool)
.exec_migrations(true)
.build()?;
let cala = CalaLedger::init(cala_config).await?;
For a complete working example — including creating accounts, transaction templates, and posting transactions — see examples/rust and run it with:
make reset-deps rust-example
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
curl -sfL https://direnv.net/install.sh | bash
echo "eval \"\$(direnv hook bash)\"" >> ~/.bashrc
source ~/.bashrc
Run unit tests with:
make reset-deps next-watch
Cala uses errlanes for error handling.