rtb-assets 0.6.1

Embedded-asset + overlay filesystem abstraction. Part of the phpboyscout Rust toolkit.
Documentation

rtb-assets

Part of the phpboyscout Rust toolkit — small, framework-free crates extracted from rust-tool-base.

Embedded-asset + overlay filesystem abstraction. Unifies compile-time embedded assets (rust-embed), physical directories, and in-memory fixtures behind one read-only API — last-wins shadowing for blobs, RFC-7396 deep merge for YAML/JSON, and lexical path-traversal rejection.

use rtb_assets::Assets;
use std::collections::HashMap;

let assets = Assets::builder()
    .memory(
        "defaults",
        HashMap::from([("greeting.txt".into(), b"hello".to_vec())]),
    )
    .build();

assert_eq!(assets.open_text("greeting.txt").unwrap(), "hello");

Development

just ci runs the full local gate (fmt, clippy, nextest, doc, deny). Tests include a cucumber BDD suite (tests/bdd.rs). Releases are cut by release-plz from Conventional Commits — do not tag manually.

License

MIT