Commit ee7f9577f94f by Will Bickford on 2026-11-14 (EE 0). Subject: Initial commit Public items: 0 added, 0 removed, 0 changed. Dependencies did not change. Code lines after this commit: 0. This commit is a checkpoint: the line counts were read from the whole tree, not from the diff. commit ee7f9577f94fdff3a5143cd9f918dcef9037f68f parent none author Will Bickford date 1794637356 2026-11-14 author+ Will Bickford Commit ab90bb3a700b by Emise on 2026-11-14 (EE 0). Subject: 0.1: raw phext stage — TEI-XML directory to multiversal phext chain Public items: 42 added, 0 removed, 0 changed. Dependencies: libphext added at 0.6.0; memmap2 added at 0.9; quick-xml added at 0.38; sha2 added at 0.10. Code lines after this commit: 1422. commit ab90bb3a700b4788cd8842dfbda32ea908556985 parent ee7f9577f94fdff3a5143cd9f918dcef9037f68f author Emise date 1794640363 2026-11-14 dep+ Cargo.toml :: libphext :: 0.6.0 dep+ Cargo.toml :: memmap2 :: 0.9 dep+ Cargo.toml :: quick-xml :: 0.38 dep+ Cargo.toml :: sha2 :: 0.10 item+ struct src/lib.rs :: ChainReader :: pub struct ChainReader { :: A data shape named ChainReader. The scanner did not read its fields. :: signature item+ function src/lib.rs :: ChainReader::open :: pub fn open(path: &Path) -> Result { :: Function ChainReader::open takes path: &Path and gives back Result. :: signature item+ struct src/lib.rs :: ChainWriter :: pub struct ChainWriter { :: Streaming chain writer (WAL write path): members are appended in order, previously written bytes are never touched; the chain-close byte is written last. Byte layout is identical to libphext `Chain::serialize` (verified by a test). :: doc comment item+ function src/lib.rs :: ChainWriter::create :: pub fn create(path: &Path) -> Result { :: Function ChainWriter::create takes path: &Path and gives back Result. :: signature item+ struct src/lib.rs :: ConversionSummary :: pub struct ConversionSummary { :: A data shape named ConversionSummary. Its fields are: pub entries: Vec; pub members_written: usize; pub out_bytes: u64. :: signature item+ struct src/lib.rs :: Element :: pub struct Element { :: A data shape named Element. Its fields are: pub ns: String; pub name: String; pub attrs: Vec<(String, String)>; pub children: Vec. :: signature item+ function src/lib.rs :: Element::is_container :: pub fn is_container(&self) -> bool { :: Function Element::is_container takes no inputs beyond the value it is called on, and gives back bool. :: signature item+ const src/lib.rs :: FORMAT_VERSION :: pub const FORMAT_VERSION: &str = "0.1"; :: A fixed value named FORMAT_VERSION, set to "0.1". :: signature item+ struct src/lib.rs :: FileEntry :: pub struct FileEntry { :: A data shape named FileEntry. Its fields are: pub rel: String; pub sha256: String; pub size: usize; pub class: StorageClass; pub original_scroll: usize; pub first_universe: Option; pub error: Option. :: signature item+ struct src/lib.rs :: IndexEntry :: pub struct IndexEntry { :: A data shape named IndexEntry. Its fields are: pub rel: String; pub sha256: String; pub size: usize; pub class: String; pub coord: phext::Coordinate; pub universe: Option. :: signature item+ enum src/lib.rs :: Node :: pub enum Node { :: A named choice named Node. It is one of: Text; Elem. :: signature item+ enum src/lib.rs :: StorageClass :: pub enum StorageClass { :: A named choice named StorageClass. It is one of: Text; Binary. :: signature item+ function src/lib.rs :: StorageClass::as_str :: pub fn as_str(&self) -> &'static str { :: Function StorageClass::as_str takes no inputs beyond the value it is called on, and gives back &'static str. :: signature item+ struct src/lib.rs :: VerifyReport :: pub struct VerifyReport { :: A data shape named VerifyReport. Its fields are: pub members: usize; pub files: usize; pub failures: usize; pub originals_verified: usize; pub refs_total: usize; pub dangling_refs: Vec; pub unreachable_universes: Vec; pub text_mismatches: Vec. :: signature item+ function src/lib.rs :: append_member :: pub fn append_member(path: &Path, member: &str) -> Result<(), String> { :: Append one member universe to an existing closed chain (WAL append): every previously written member byte is left untouched; only the old chain-close byte is overwritten by the separator+member+close sequence. :: doc comment item+ function src/lib.rs :: classify :: pub fn classify(bytes: &[u8]) -> StorageClass { :: Function classify takes bytes: &[u8] and gives back StorageClass. :: signature item+ function src/lib.rs :: close :: pub fn close(mut self) -> Result<(), String> { :: Function close takes mut self and gives back Result<(), String>. :: signature item+ function src/lib.rs :: collect_xml_files :: pub fn collect_xml_files(dir: &Path) -> Result, String> { :: Function collect_xml_files takes dir: &Path and gives back Result, String>. :: signature item+ function src/lib.rs :: convert_dir :: pub fn convert_dir(dir: &Path, out: &Path) -> Result { :: Function convert_dir takes dir: &Path, out: &Path and gives back Result. :: signature item+ function src/lib.rs :: coord :: pub fn coord(scroll: usize) -> phext::Coordinate { :: Function coord takes scroll: usize and gives back phext::Coordinate. :: signature item+ function src/lib.rs :: extract_original :: pub fn extract_original(reader: &ChainReader, rel: &str) -> Result, String> { :: Extract one original back out of $1, verifying its SHA-256. :: doc comment item+ function src/lib.rs :: get :: pub fn get(&self, universe: usize, coord: &phext::Coordinate) -> Option<&str> { :: Function get takes &self, universe: usize, coord: &phext::Coordinate and gives back Option<&str>. :: signature item+ function src/lib.rs :: member :: pub fn member(&self, universe: usize) -> Option<&str> { :: Function member takes &self, universe: usize and gives back Option<&str>. :: signature item+ function src/lib.rs :: member_count :: pub fn member_count(&self) -> usize { :: Function member_count takes no inputs beyond the value it is called on, and gives back usize. :: signature item+ function src/lib.rs :: parse_index :: pub fn parse_index(scroll: &str) -> (Vec, Vec<(String, String)>) { :: Function parse_index takes scroll: &str and gives back (Vec, Vec<(String, String)>). :: signature item+ function src/lib.rs :: parse_subspace :: pub fn parse_subspace(addr: &str) -> Result<(usize, phext::Coordinate), String> { :: Parse a `$N:1.1.1/1.1.1/1.1.1` subspace address. :: doc comment item+ function src/lib.rs :: parse_xml :: pub fn parse_xml(bytes: &[u8]) -> Result { :: Parse one XML document (bytes) into an Element tree. Namespace URIs are resolved with a prefix-scope stack; attributes keep their qualified names as written. Comments, PIs, declarations and DOCTYPE are not represented (the original is preserved verbatim in $1). :: doc comment item+ function src/lib.rs :: rel_of :: pub fn rel_of(base: &Path, p: &Path) -> String { :: Function rel_of takes base: &Path, p: &Path and gives back String. :: signature item+ function src/lib.rs :: renumber_refs :: pub fn renumber_refs(member: &str, offset: usize) -> String { :: Rewrite every `@ref $k` scroll in a member from local to global numbering by adding `offset` (the file's first-universe number − 1). Goes through libphext explode/implode — no delimiter handling here. :: doc comment item+ function src/lib.rs :: scroll_number :: pub fn scroll_number(c: &phext::Coordinate) -> usize { :: Function scroll_number takes c: &phext::Coordinate and gives back usize. :: signature item+ function src/lib.rs :: scrolls_of :: pub fn scrolls_of(&self, universe: usize) -> Vec<(usize, String)> { :: Scrolls of a universe as (scroll number, content), in scroll order. :: doc comment item+ function src/lib.rs :: sha256_hex :: pub fn sha256_hex(bytes: &[u8]) -> String { :: Function sha256_hex takes bytes: &[u8] and gives back String. :: signature item+ function src/lib.rs :: text_nodes :: pub fn text_nodes(&self, out: &mut Vec) { :: All text nodes of this element's subtree, in document order. :: doc comment item+ function src/lib.rs :: universe_text_and_refs :: pub fn universe_text_and_refs(reader: &ChainReader, root_universe: usize) -> (Vec, Vec) { :: Walk one converted universe subtree: collect (text nodes, refs followed). Mirrors the encoder's grammar exactly. :: doc comment item+ function src/lib.rs :: verify :: pub fn verify(chain: &Path, corpus_dir: Option<&Path>) -> Result { :: Function verify takes chain: &Path, corpus_dir: Option<&Path> and gives back Result. :: signature item+ function src/lib.rs :: write_member :: pub fn write_member(&mut self, member: &str) -> Result<(), String> { :: Function write_member takes &mut self, member: &str and gives back Result<(), String>. :: signature item+ flag src/main.rs :: --corpus :: flag --corpus :: A command line flag, --corpus. It is read by the program when the user passes it. :: signature item+ command src/main.rs :: convert :: command "convert" :: A command named convert. The program runs it when the user types this word on the command line. :: signature item+ command src/main.rs :: extract :: command "extract" :: A command named extract. The program runs it when the user types this word on the command line. :: signature item+ entry-point src/main.rs :: main :: fn main() -> ExitCode { :: The entry point: the program starts here. It reads the command line and runs the command the user named. :: signature item+ command src/main.rs :: show :: command "show" :: A command named show. The program runs it when the user types this word on the command line. :: signature item+ command src/main.rs :: verify :: command "verify" :: A command named verify. The program runs it when the user types this word on the command line. :: signature stat Markdown files 1 total 51 blank 0 comment 0 code 51 stat Rust files 5 total 1359 blank 0 comment 0 code 1359 stat TOML files 1 total 12 blank 0 comment 0 code 12 author+ Emise Commit 3a23d1c2a379 by Will Bickford on 2026-11-14 (EE 0). Subject: Merge pull request #1 from wbic16/emise/0.1-raw-phext Public items: 0 added, 0 removed, 0 changed. Dependencies did not change. Code lines after this commit: 1422. commit 3a23d1c2a37987f44b03c2bb961b33252e8ce916 parent ab90bb3a700b4788cd8842dfbda32ea908556985 author Will Bickford date 1794640500 2026-11-14 stat Markdown files 1 total 51 blank 0 comment 0 code 51 stat Rust files 5 total 1359 blank 0 comment 0 code 1359 stat TOML files 1 total 12 blank 0 comment 0 code 12 author~ Will Bickford commits 2 Commit 01e1bf4e4c84 by Emise on 2026-11-14 (EE 0). Subject: 0.2.0: Mutable OS native Cavern zip export Public items: 12 added, 0 removed, 0 changed. Dependencies: rand added at 0.8; rusqlite added at 0.32; zip added at 2. Code lines after this commit: 2813. commit 01e1bf4e4c84a3ff9f952afe0456bc68add9f42b parent 3a23d1c2a37987f44b03c2bb961b33252e8ce916 author Emise date 1794643370 2026-11-14 dep+ Cargo.toml :: rand :: 0.8 dep+ Cargo.toml :: rusqlite :: 0.32 dep+ Cargo.toml :: zip :: 2 item+ command src/main.rs :: mutable :: command "mutable" :: A command named mutable. The program runs it when the user types this word on the command line. :: signature item+ const src/mutable.rs :: IMPORT_GENERATION :: pub const IMPORT_GENERATION: &str = "tei-import-1"; :: Deterministic generation id for the import save (matches Mutable's /^[a-zA-Z0-9-]+$/ generation rule). :: doc comment item+ enum src/mutable.rs :: Json :: pub enum Json { :: A named choice named Json. It is one of: Null; Bool; Int; Str; Arr; Obj. :: signature item+ function src/mutable.rs :: Json::to_pretty :: pub fn to_pretty(&self) -> String { :: JSON.stringify(value, null, 2): objects/arrays expand one item per line; empty ones stay inline as {} / []. :: doc comment item+ struct src/mutable.rs :: MutableDocument :: pub struct MutableDocument { :: One converted Mutable document, ready to write into the Cavern tree. :: doc comment item+ struct src/mutable.rs :: MutableEntry :: pub struct MutableEntry { :: A data shape named MutableEntry. Its fields are: pub rel: String; pub error: Option; pub doc_rel: Option; pub resource_id: Option; pub title: Option; pub blocks: usize; pub annotations: usize. :: signature item+ struct src/mutable.rs :: MutableSummary :: pub struct MutableSummary { :: A data shape named MutableSummary. Its fields are: pub entries: Vec; pub vault_guid: String; pub documents: usize; pub out_bytes: u64. :: signature item+ function src/mutable.rs :: build_document :: pub fn build_document(rel: &str, root: &Element) -> MutableDocument { :: Build the Mutable document for one parsed TEI file (0.1 model element). :: doc comment item+ function src/mutable.rs :: document_rel_for :: pub fn document_rel_for(rel: &str) -> String { :: The document filename for a source relative path: `MS.xml` -> `MS.mutable.json`, folders preserved. :: doc comment item+ function src/mutable.rs :: export_mutable :: pub fn export_mutable(dir: &Path, out: &Path) -> Result { :: Export a directory of TEI-XML as a Mutable native Cavern zip. Every source file is accounted for: converted (a document), or named in the returned entries with its error — zero silent skips, as in 0.1. The original XML rides in the tree verbatim either way. :: doc comment item+ function src/mutable.rs :: resource_id_for :: pub fn resource_id_for(rel: &str) -> String { :: Deterministic resourceId: a UUID-shaped digest of the source relative path (SHA-256, version/variant bits set) — stable across runs, unique per tree slot. :: doc comment item+ function src/mutable.rs :: to_compact :: pub fn to_compact(&self) -> String { :: JSON.stringify(value): compact, key order as constructed. :: doc comment stat Markdown files 2 total 187 blank 0 comment 0 code 187 stat Rust files 8 total 2604 blank 0 comment 0 code 2604 stat TOML files 1 total 22 blank 0 comment 0 code 22 author+ Emise Commit 8a4c4b2960c9 by Will Bickford on 2026-11-14 (EE 0). Subject: Merge pull request #2 from wbic16/emise/0.2-mutable Public items: 0 added, 0 removed, 0 changed. Dependencies did not change. Code lines after this commit: 2813. commit 8a4c4b2960c9907392a45406b4d8f34aa3716379 parent 01e1bf4e4c84a3ff9f952afe0456bc68add9f42b author Will Bickford date 1794643572 2026-11-14 stat Markdown files 2 total 187 blank 0 comment 0 code 187 stat Rust files 8 total 2604 blank 0 comment 0 code 2604 stat TOML files 1 total 22 blank 0 comment 0 code 22 author~ Will Bickford commits 3 Commit cb565a71ad0d by Theia on 2026-11-14 (EE 0). Subject: 0.3.0: Phextura corpora with standoff, plus the PhextVFS cavern image Public items: 78 added, 0 removed, 2 changed. Dependencies did not change. Code lines after this commit: 8028. commit cb565a71ad0d9c4ef17087706c7d76ff2582b33a parent 8a4c4b2960c9907392a45406b4d8f34aa3716379 author Theia date 1794647949 2026-11-14 item+ struct src/lib.rs :: Doctype :: pub struct Doctype { :: A document type declaration, as written (stage 0.3, ruling D3). :: doc comment item+ struct src/lib.rs :: ParsedDocument :: pub struct ParsedDocument { :: The full parse of one XML document: root element tree plus the prolog and epilog material (comments, PIs) and the DOCTYPE, which live outside the root element but are part of the document (stage 0.3, ruling D3). :: doc comment item+ function src/lib.rs :: collapse_ws :: pub fn collapse_ws(text: &str) -> String { :: Whitespace-collapse: runs become one space, ends trimmed. :: doc comment item+ function src/lib.rs :: element_text :: pub fn element_text(el: &Element) -> String { :: All text of an element's subtree, concatenated in document order. :: doc comment item+ function src/lib.rs :: extract_title :: pub fn extract_title(root: &Element, rel: &str) -> String { :: Title: teiHeader/fileDesc/titleStmt/title, fallback msIdentifier/idno, fallback the source filename stem (STAGE2-RECON.md §4.3). :: doc comment item+ function src/lib.rs :: first_named :: pub fn first_named<'a>(el: &'a Element, name: &str) -> Option<&'a Element> { :: First element with this local name in pre-order (self included). :: doc comment item+ function src/lib.rs :: parse_doctype :: pub fn parse_doctype(raw: &str) -> Doctype { :: Parse the inner text of a `` declaration (everything between ``). :: doc comment item~ function src/lib.rs :: parse_xml :: pub fn parse_xml(bytes: &[u8]) -> Result { :: Parse one XML document (bytes) into an Element tree. Namespace URIs are resolved with a prefix-scope stack; attributes keep their qualified names as written. Since stage 0.3 the tree also carries comments and PIs as nodes; the 0.1/0.2 emitters skip them (their forms never represented comments/PIs — the original is preserved verbatim). :: doc comment item+ function src/lib.rs :: parse_xml_full :: pub fn parse_xml_full(bytes: &[u8]) -> Result { :: Parse one XML document into root tree + prolog/epilog + DOCTYPE. :: doc comment item~ function src/lib.rs :: text_nodes :: pub fn text_nodes(&self, out: &mut Vec) { :: All text nodes of this element's subtree, in document order. Comments and PIs are not text nodes and never appear here. :: doc comment item+ flag src/main.rs :: --no-vfs :: flag --no-vfs :: A command line flag, --no-vfs. It is read by the program when the user passes it. :: signature item+ command src/main.rs :: phextura :: command "phextura" :: A command named phextura. The program runs it when the user types this word on the command line. :: signature item+ command src/main.rs :: relocate-phextura :: command "relocate-phextura" :: A command named relocate-phextura. The program runs it when the user types this word on the command line. :: signature item+ command src/main.rs :: verify-phextura :: command "verify-phextura" :: A command named verify-phextura. The program runs it when the user types this word on the command line. :: signature item+ struct src/phextura.rs :: C9 :: pub struct C9 { :: A full 9-component phext coordinate (Z/Y/X), the address currency of this module; converted to libphext coordinates only at the implode boundary. :: doc comment item+ function src/phextura.rs :: C9::new :: pub fn new(z: (u32, u32, u32), y: (u32, u32, u32), x: (u32, u32, u32)) -> C9 { :: Function C9::new takes z: and gives back C9. :: signature item+ const src/phextura.rs :: CONVERTER :: pub const CONVERTER: &str = concat!("teixml-to-mutable ", env!("CARGO_PKG_VERSION")); :: A fixed value named CONVERTER, set to concat!("teixml-to-mutable ", env!("CARGO_PKG_VERSION")). :: signature item+ struct src/phextura.rs :: Detached :: pub struct Detached { :: A data shape named Detached. Its fields are: pub key: String; pub class: String, // span-edited | span-absent | key-retired; pub quoted: String. :: signature item+ struct src/phextura.rs :: EntryRec :: pub struct EntryRec { :: A data shape named EntryRec. Its fields are: pub kind: &'static str, // tei-element | tei-comment | tei-pi; pub form: TargetForm; pub hash: String; pub text: String; pub before: Option; pub after: Option; pub tei_element: Option; pub tei_ns: Option; pub pi_target: Option; pub attrs: Vec<(String, String)>; pub refs: Vec; pub body: String. :: signature item+ const src/phextura.rs :: KIND_ORDER :: pub const KIND_ORDER: &[&str] = &["paper", "section", "bibentry", "figure", "tei-element"]; :: L2 key kinds, in object-table index order (LAYER2 §1.4 + profile extension kind `tei-element`, minted on cite only). :: doc comment item+ const src/phextura.rs :: POINTING_ATTRS :: pub const POINTING_ATTRS: &[&str] = &[ "ref", "target", "corresp", "decls", "sameAs", "copyOf", "next", "prev", "ana", ]; :: Attributes whose values are treated as references (SPEC-0.3 §3.5). :: doc comment item+ const src/phextura.rs :: PROFILE_VERSION :: pub const PROFILE_VERSION: &str = "0.1"; :: A fixed value named PROFILE_VERSION, set to "0.1". :: signature item+ struct src/phextura.rs :: ParsedEntry :: pub struct ParsedEntry { :: A data shape named ParsedEntry. Its fields are: pub coord: C9; pub kind: String; pub key_n: usize; pub target: TargetAddr; pub hash: String; pub text: String; pub before: Option; pub after: Option; pub tei_element: Option; pub tei_ns: Option; pub pi_target: Option; pub attrs: Vec<(String, String)>; pub refers: Vec; pub refers_unresolved: Vec; pub refers_external: Vec; pub body: String. :: signature item+ struct src/phextura.rs :: PhexturaFileEntry :: pub struct PhexturaFileEntry { :: A data shape named PhexturaFileEntry. Its fields are: pub rel: String; pub series: u32; pub error: Option; pub entries: usize; pub scrolls: usize. :: signature item+ struct src/phextura.rs :: PhexturaSummary :: pub struct PhexturaSummary { :: A data shape named PhexturaSummary. Its fields are: pub name: String; pub slug: String; pub entries: Vec; pub documents: usize; pub base_path: PathBuf; pub standoff_path: PathBuf; pub base_bytes: u64; pub standoff_bytes: u64; pub base_scrolls: usize; pub standoff_scrolls: usize; pub total_entries: usize; pub entries_by_kind: Vec<(String, usize)>; pub refs: RefCounts; pub externals: usize; pub pin: String; pub vfs_path: Option; pub vfs_bytes: u64; pub vfs_scrolls: usize. :: signature item+ struct src/phextura.rs :: ReconReport :: pub struct ReconReport { :: A data shape named ReconReport. Its fields are: pub ok: bool; pub mismatches: Vec; pub mismatch_total: usize; pub files: usize; pub originals_verified: usize; pub segments: usize; pub elements: usize; pub attributes: usize; pub comments: usize; pub pis: usize; pub doctypes: usize; pub refs_resolved: usize; pub refs_unresolved: usize; pub refs_external: usize. :: signature item+ struct src/phextura.rs :: RefCounts :: pub struct RefCounts { :: A data shape named RefCounts. Its fields are: pub resolved: usize; pub unresolved: usize; pub external: usize. :: signature item+ enum src/phextura.rs :: RefOut :: pub enum RefOut { :: A named choice named RefOut. It is one of: Key; Unresolved; External. :: signature item+ struct src/phextura.rs :: RelocReport :: pub struct RelocReport { :: A data shape named RelocReport. Its fields are: pub total: usize; pub exact: usize; pub relocated_verified: usize; pub relocated_moved: usize; pub lost: Vec; pub ambiguous: Vec. :: signature item+ const src/phextura.rs :: SECTION_ELEMENTS :: pub const SECTION_ELEMENTS: &[&str] = &[ "div", "div1", "div2", "div3", "div4", "div5", "div6", "div7", "msItem", ]; :: Elements that head a LAYER2 `section` object when headed (profile §3). :: doc comment item+ struct src/phextura.rs :: ScrollParts :: pub struct ScrollParts { :: A scroll split into role line, header lines, and body (text after the first blank line; header-only scrolls have an empty body). :: doc comment item+ const src/phextura.rs :: TEI_NS :: pub const TEI_NS: &str = "http://www.tei-c.org/ns/1.0"; :: A fixed value named TEI_NS, set to "http://www.tei-c.org/ns/1.0". :: signature item+ struct src/phextura.rs :: TargetAddr :: pub struct TargetAddr { :: A data shape named TargetAddr. Its fields are: pub slug: String; pub pin: String; pub kind: Option; pub key_slug: Option; pub at: Option<(C9, usize, usize)>. :: signature item+ enum src/phextura.rs :: TargetForm :: pub enum TargetForm { :: A named choice named TargetForm. It is one of: Object; At. :: signature item+ struct src/phextura.rs :: ValidateReport :: pub struct ValidateReport { :: A data shape named ValidateReport. Its fields are: pub ok: bool; pub failures: Vec; pub base_scrolls: usize; pub standoff_scrolls: usize; pub base_checksum_ok: bool; pub standoff_checksum_ok: bool; pub keys_indexed: usize; pub entries: usize; pub media_headers: usize; pub externals_declared: usize; pub bare_coords_in_prose: usize; pub resolvable_bare_coords: usize. :: signature item+ function src/phextura.rs :: addr :: pub fn addr(&self) -> String { :: Function addr takes no inputs beyond the value it is called on, and gives back String. :: signature item+ function src/phextura.rs :: canonical_bytes :: pub fn canonical_bytes(map: &HashMap) -> Vec { :: Function canonical_bytes takes map: &HashMap and gives back Vec. :: signature item+ function src/phextura.rs :: check_reconstruction :: pub fn check_reconstruction( base_path: &Path, standoff_path: &Path, corpus_dir: &Path, ) -> Result { :: Function check_reconstruction takes base_path: &Path, standoff_path: &Path, corpus_dir: &Path, and gives back Result. :: signature item+ function src/phextura.rs :: edition_checksum :: pub fn edition_checksum(map: &HashMap, manifest: C9) -> String { :: The edition checksum: libphext xxh3-128 over the canonical form of the corpus with the checksum line excluded from its manifest scroll. :: doc comment item+ function src/phextura.rs :: escape_value :: pub fn escape_value(v: &str) -> String { :: Function escape_value takes v: &str and gives back String. :: signature item+ function src/phextura.rs :: export_phextura :: pub fn export_phextura(dir: &Path, out_dir: &Path) -> Result { :: Function export_phextura takes dir: &Path, out_dir: &Path and gives back Result. :: signature item+ function src/phextura.rs :: export_phextura_opts :: pub fn export_phextura_opts( dir: &Path, out_dir: &Path, emit_vfs: bool, ) -> Result { :: As `export_phextura`; `emit_vfs` controls the D6 PhextVFS image (`cavern.phext`), a third consumer of the assembled pair — the corpus and standoff writers are untouched either way (the D6 seam). :: doc comment item+ function src/phextura.rs :: iso_from_unix :: pub fn iso_from_unix(secs: u64) -> String { :: Function iso_from_unix takes secs: u64 and gives back String. :: signature item+ function src/phextura.rs :: iso_now :: pub fn iso_now() -> String { :: Function iso_now takes no inputs beyond the value it is called on, and gives back String. :: signature item+ function src/phextura.rs :: line_of :: pub fn line_of<'a>(lines: &'a [(String, String)], name: &str) -> Option<&'a str> { :: Function line_of takes lines: &'a [ and gives back Option<&'a str>. :: signature item+ function src/phextura.rs :: lines_of :: pub fn lines_of<'a>(lines: &'a [(String, String)], name: &str) -> Vec<&'a str> { :: Function lines_of takes lines: &'a [ and gives back Vec<&'a str>. :: signature item+ function src/phextura.rs :: load_entries :: pub fn load_entries( standoff: &HashMap, ) -> Result, String> { :: All standoff entries, sorted into minting order (series, then scroll). :: doc comment item+ function src/phextura.rs :: load_map :: pub fn load_map(path: &Path) -> Result, String> { :: Function load_map takes path: &Path and gives back Result, String>. :: signature item+ function src/phextura.rs :: manifest_coord :: pub fn manifest_coord() -> C9 { :: The corpus-level manifest coordinate (Series 1, Collection 6). :: doc comment item+ function src/phextura.rs :: parse :: pub fn parse(s: &str) -> Option { :: Function parse takes s: &str and gives back Option. :: signature item+ function src/phextura.rs :: parse_entry :: pub fn parse_entry(coord: C9, text: &str) -> Result { :: Function parse_entry takes coord: C9, text: &str and gives back Result. :: signature item+ function src/phextura.rs :: parse_target :: pub fn parse_target(addr: &str) -> Result { :: Function parse_target takes addr: &str and gives back Result. :: signature item+ function src/phextura.rs :: phext :: pub fn phext(&self) -> phext::Coordinate { :: Function phext takes no inputs beyond the value it is called on, and gives back phext::Coordinate. :: signature item+ function src/phextura.rs :: relocate :: pub fn relocate(base_path: &Path, standoff_path: &Path) -> Result { :: Function relocate takes base_path: &Path, standoff_path: &Path and gives back Result. :: signature item+ function src/phextura.rs :: render_attr_name :: pub fn render_attr_name(qname: &str, scope: &HashMap) -> String { :: Render an attribute's qualified name for an `attr-` header line: namespaced names render as `{}` (profile §4); the prefix resolves against the xmlns declarations in scope, with `xml` predefined. An unresolvable prefix (undeclared — malformed input) renders as written. :: doc comment item+ function src/phextura.rs :: slugify :: pub fn slugify(s: &str) -> String { :: Function slugify takes s: &str and gives back String. :: signature item+ function src/phextura.rs :: split_scroll :: pub fn split_scroll(text: &str) -> ScrollParts { :: Function split_scroll takes text: &str and gives back ScrollParts. :: signature item+ function src/phextura.rs :: standoff_meta_coord :: pub fn standoff_meta_coord() -> C9 { :: The standoff's own metadata coordinate (its Collection 6, Series 1). :: doc comment item+ function src/phextura.rs :: strip_checksum_line :: pub fn strip_checksum_line(text: &str) -> String { :: Remove any `checksum: xxh3-128:` line from a scroll's text. :: doc comment item+ function src/phextura.rs :: unescape_value :: pub fn unescape_value(v: &str) -> Result { :: Function unescape_value takes v: &str and gives back Result. :: signature item+ function src/phextura.rs :: validate_pair :: pub fn validate_pair(base_path: &Path, standoff_path: &Path) -> Result { :: Function validate_pair takes base_path: &Path, standoff_path: &Path and gives back Result. :: signature item+ function src/segment.rs :: <'a> Flat<'a>::index_of :: pub fn index_of(&self, e: &Element) -> usize { :: Function <'a> Flat<'a>::index_of takes &self, e: &Element and gives back usize. :: signature item+ const src/segment.rs :: BLOCK_ELEMENTS :: pub const BLOCK_ELEMENTS: &[&str] = &[ "ab", "additions", "adminInfo", "analytic", "argument", "bibl", "biblStruct", "bindingDesc", "body", "back", "cell", "cit", "closer", "custodialHist", "decoDesc", "div", "div1", "div2", "div3", "div4", "div5", "div6", "div7", "docAuthor", "docDate", "docEdition :: TEI block-level elements: each owns text segments; any other element containing a block-level descendant acts as a container; everything else is inline. :: doc comment item+ struct src/segment.rs :: Flat :: pub struct Flat<'a> { :: A pre-order flattening of one document tree: occurrence indices, parent/depth, subtree ranges, and per-element descendant text. :: doc comment item+ struct src/segment.rs :: InlineOcc :: pub struct InlineOcc { :: One inline element occurrence inside a segment. :: doc comment item+ struct src/segment.rs :: SegMark :: pub struct SegMark { :: A comment or PI encountered during the walk (ruling D3). :: doc comment item+ struct src/segment.rs :: Segment :: pub struct Segment { :: One raw segment (pre-keep-rule). :: doc comment item+ struct src/segment.rs :: Segmentation :: pub struct Segmentation { :: A data shape named Segmentation. Its fields are: pub segments: Vec; pub marks: Vec. :: signature item+ function src/segment.rs :: flatten :: pub fn flatten(root: &Element) -> Flat<'_> { :: Function flatten takes root: &Element and gives back Flat<'_>. :: signature item+ function src/segment.rs :: has_block_descendant :: pub fn has_block_descendant(el: &Element) -> bool { :: Function has_block_descendant takes el: &Element and gives back bool. :: signature item+ function src/segment.rs :: is_block :: pub fn is_block(name: &str) -> bool { :: Function is_block takes name: &str and gives back bool. :: signature item+ function src/segment.rs :: is_empty :: pub fn is_empty(&self) -> bool { :: Function is_empty takes no inputs beyond the value it is called on, and gives back bool. :: signature item+ function src/segment.rs :: kept_map :: pub fn kept_map(seg: &Segmentation) -> Vec> { :: The keep rule (0.2, recon §4.4): a segment survives iff its text is non-whitespace or it carries at least one inline occurrence. Returns (raw index → kept index) for kept segments. :: doc comment item+ function src/segment.rs :: len :: pub fn len(&self) -> usize { :: Function len takes no inputs beyond the value it is called on, and gives back usize. :: signature item+ function src/segment.rs :: segment_document :: pub fn segment_document(root: &Element, flat: &Flat) -> Segmentation { :: Segment one document. Identical segmentation to the 0.2 export's Builder (same keep rule inputs, same order); the 0.2 test suite is the regression net. :: doc comment item+ const src/vfs.rs :: VFS_CHUNK_SIZE :: pub const VFS_CHUNK_SIZE: usize = 65536; :: Mutable's DEFAULT_CHUNK_SIZE (vfs.ts). :: doc comment item+ struct src/vfs.rs :: VfsImageInfo :: pub struct VfsImageInfo { :: A data shape named VfsImageInfo. Its fields are: pub bytes: usize; pub scrolls: usize; pub files: usize; pub chunks: usize; pub checksum_scrolls: usize. :: signature item+ function src/vfs.rs :: base64_encode :: pub fn base64_encode(bytes: &[u8]) -> String { :: Standard base64 (RFC 4648, padded) — the encoding Mutable's `Buffer.toString("base64")` produces and its reader decodes per chunk. :: doc comment item+ function src/vfs.rs :: build_cavern_image :: pub fn build_cavern_image(files: &[(&str, &[u8])]) -> (Vec, VfsImageInfo) { :: Build the `cavern.phext` image holding `files` (name, bytes) in the given order at the documents-stratum root, in the VFS binary format. Returns the image bytes and its accounting. :: doc comment item+ function src/vfs.rs :: json_escape :: pub fn json_escape(s: &str) -> String { :: JSON string escaping with JSON.stringify semantics (the index and manifest scrolls are consumed by Mutable's `JSON.parse`). :: doc comment stat Markdown files 3 total 785 blank 0 comment 0 code 785 stat Rust files 13 total 7221 blank 0 comment 0 code 7221 stat TOML files 1 total 22 blank 0 comment 0 code 22 author+ Theia Commit 57706661107e by Will Bickford on 2026-11-14 (EE 0). Subject: Merge pull request #3 from wbic16/emise/0.3-phextura Public items: 0 added, 0 removed, 0 changed. Dependencies did not change. Code lines after this commit: 6984. This commit is a checkpoint: the line counts were read from the whole tree, not from the diff. commit 57706661107e72bc322e02a66bc0972b3d409a54 parent cb565a71ad0d9c4ef17087706c7d76ff2582b33a author Will Bickford date 1794648701 2026-11-14 stat Markdown files 3 total 785 blank 133 comment 0 code 652 stat Rust files 13 total 7221 blank 317 comment 592 code 6312 stat TOML files 1 total 22 blank 2 comment 0 code 20 author~ Will Bickford commits 4