citum_store
Platform-aware storage layer for user-installed Citum styles and locales.
Provides a StoreResolver that searches XDG data directories for custom
styles and locales, falling back to embedded builtins when nothing local
matches.
Supports YAML, JSON, and CBOR formats. With the http feature, the
resolver chain can also fetch styles from remote registries on demand
(using rustls only — no system OpenSSL dependency).
Usage
A StoreResolver resolves a style URI against a single data directory
and returns a parsed Style (the resolver handles format detection
and YAML/JSON/CBOR parsing under the hood):
use ;
use PathBuf;
let store_dir = from;
let resolver = new;
let style = resolver.resolve_style?;
For the standard XDG + embedded-fallback chain (and HTTP fetches when
the http feature is on), use build_standard_chain, which composes
the platform-appropriate resolvers automatically:
use build_standard_chain;
let chain = build_standard_chain?;
let style = chain.resolve_style?;
Project
Part of Citum, a modern citation engine in Rust.
License
Dual-licensed under MIT or Apache-2.0 at your option.