14 releases

0.4.0 Feb 25, 2024
0.3.0 Dec 27, 2022
0.2.0 Sep 19, 2022
0.1.9 Jun 1, 2021
0.1.6 May 31, 2021

#53 in #mysql

MIT/Apache

255KB
7K SLoC

rucash

The Rust for Gnucash


rucash provides a simple interface to GnuCash files stored in xml and SQL (sqlite3, PostgreSQL and MySQL).

Example

use rucash::{Book, SQLiteQuery};

#[tokio::main]
async fn main() {
    let query = SQLiteQuery::new("sqlite://tests/db/sqlite/complex_sample.gnucash?mode=ro").await.unwrap();
    let book = Book::new(query).await.unwrap();
    let accounts = book.accounts();
}

Install

# Cargo.toml
[dependencies]
rucash = { version = "0.4", features = [ "sqlite", "decimal" ] }

Cargo Feature Flags

  • sqlite: Add support for the self-contained SQLite database engine.
  • postgresql: Add support for the Postgres database server.
  • mysql: Add support for the MySQL database server.
  • xml: Add support for xml.
  • decimal: Add support for Decimal.

Dependencies

~5–21MB
~307K SLoC