1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//! Cardinal Codex Pack System
//!
//! This module provides functionality for creating, loading, and managing
//! .ccpack files - single-file distributable bundles of card definitions
//! and Rhai scripts.
//!
//! # Overview
//!
//! A `.ccpack` file is a deterministic, compressed archive containing:
//! - `pack.toml`: Pack metadata (ID, version, dependencies)
//! - `cards/*.toml`: Card definition files
//! - `scripts/*.rhai`: Rhai script files
//! - `manifest.toml`: Auto-generated file list with hashes
//!
//! # Format
//!
//! The pack format is:
//! - Deterministic: Same input → same output
//! - Portable: Single file, no extraction needed
//! - Inspectable: Can list contents without extraction
//! - Verifiable: Includes SHA-256 hashes for all files
//!
//! # Example Usage
//!
//! ```no_run
//! use cardinal::pack::{build_pack, load_pack, list_pack};
//!
//! // Build a pack from a directory
//! build_pack("./my-pack", "./output/my-pack.ccpack").unwrap();
//!
//! // List pack contents
//! list_pack("./output/my-pack.ccpack").unwrap();
//!
//! // Load pack into memory
//! let (manifest, files) = load_pack("./output/my-pack.ccpack").unwrap();
//! ```
// Re-export main API
pub use ;
pub use build_pack;
pub use ;