Skip to content

vox-bounded-fs API Reference (generated)

Crate: vox-bounded-fs · Version: 0.6.0 · Target: Library (lib.rs)

Sandboxed, bounded filesystem operations from the Vox project.

UTF-8 file reads capped by [vox_scaling_policy::ScalingPolicy::embedded] max_file_bytes_hint.

This crate is the workspace SSOT for scaling-policy-aware capped reads used by CI, MCP, publisher, Populi, and other crates. Prefer it over per-crate copies of bounded_fs.

FeatureDefault / Enables
asyncdep:tokio
default—
DependencyKind
vox-scaling-policyNormal
FunctionDescription
max_file_bytes_hintCurrent cap from embedded scaling policy.
read_utf8_path_cappedRead a file as UTF-8; errors if size exceeds [max_file_bytes_hint] or bytes are not valid UTF-8.
normalize_textNormalize source/text bytes for cross-platform consistency: strip one leading UTF-8 BOM and convert CRLF/CR line endings to LF. Pure, idempotent, and allocation-light (returns input unchanged when already clean). Shared by the compiler lexer and the runtime text-read functions.
read_utf8_path_capped_or_emptySame as [read_utf8_path_capped] but returns an empty string on any failure.
read_utf8_path_capped_optSame as [read_utf8_path_capped] but returns None on any failure.
read_utf8_path_capped_asyncCapped read on the blocking pool (for async call sites; avoids unbounded tokio::fs::read_to_string).
Dependency Topology, diagram 114 nodes, 13 edges: vox-bounded-fs → vox-scaling-policy; vox-actor-runtime → vox-bounded-fs; vox-cli → vox-bounded-fs; vox-cli-ci → vox-bounded-fs; vox-cli-contracts → vox-bounded-fs; vox-cli-core → vox-bounded-fs; vox-cli-research → vox-bounded-fs; vox-cli-review → vox-bounded-fs; vox-code-audit →…vox-bounded-fsvox-scaling-policyvox-actor-runtimevox-clivox-cli-civox-cli-contractsvox-cli-corevox-cli-researchvox-cli-reviewvox-code-auditvox-compilervox-corpusvox-doc-inventoryvox-doc-pipeline
Diagram source
graph {
direction: right
node vox_bounded_fs: "vox-bounded-fs"
node vox_scaling_policy: "vox-scaling-policy"
vox_bounded_fs -> vox_scaling_policy
node vox_actor_runtime: "vox-actor-runtime"
vox_actor_runtime -> vox_bounded_fs
node vox_cli: "vox-cli"
vox_cli -> vox_bounded_fs
node vox_cli_ci: "vox-cli-ci"
vox_cli_ci -> vox_bounded_fs
node vox_cli_contracts: "vox-cli-contracts"
vox_cli_contracts -> vox_bounded_fs
node vox_cli_core: "vox-cli-core"
vox_cli_core -> vox_bounded_fs
node vox_cli_research: "vox-cli-research"
vox_cli_research -> vox_bounded_fs
node vox_cli_review: "vox-cli-review"
vox_cli_review -> vox_bounded_fs
node vox_code_audit: "vox-code-audit"
vox_code_audit -> vox_bounded_fs
node vox_compiler: "vox-compiler"
vox_compiler -> vox_bounded_fs
node vox_corpus: "vox-corpus"
vox_corpus -> vox_bounded_fs
node vox_doc_inventory: "vox-doc-inventory"
vox_doc_inventory -> vox_bounded_fs
node vox_doc_pipeline: "vox-doc-pipeline"
vox_doc_pipeline -> vox_bounded_fs
}
Consumer CrateRole
vox-actor-runtimeDirect workspace dependent
vox-cliDirect workspace dependent
vox-cli-ciDirect workspace dependent
vox-cli-contractsDirect workspace dependent
vox-cli-coreDirect workspace dependent
vox-cli-researchDirect workspace dependent
vox-cli-reviewDirect workspace dependent
vox-code-auditDirect workspace dependent
vox-compilerDirect workspace dependent
vox-corpusDirect workspace dependent
vox-doc-inventoryDirect workspace dependent
vox-doc-pipelineDirect workspace dependent
vox-gamifyDirect workspace dependent
vox-gitDirect workspace dependent
vox-hf-layoutDirect workspace dependent
vox-integration-testsDirect workspace dependent
vox-ml-cliDirect workspace dependent
vox-orchestratorDirect workspace dependent
vox-orchestrator-mcpDirect workspace dependent
vox-orchestrator-modelsDirect workspace dependent
vox-plugin-populi-meshDirect workspace dependent
vox-populiDirect workspace dependent
vox-publisherDirect workspace dependent
vox-repositoryDirect workspace dependent
vox-searchDirect workspace dependent
vox-secretsDirect workspace dependent
KindSymbolSignatureSourceDescription
fnmax_file_bytes_hintpub fn max_file_bytes_hint() -> u64crates/vox-bounded-fs/src/lib.rs#L16-L18Current cap from embedded scaling policy.
fnread_utf8_path_cappedpub fn read_utf8_path_capped(path: &Path) -> Result<String>crates/vox-bounded-fs/src/lib.rs#L21-L35Read a file as UTF-8; errors if size exceeds [max_file_bytes_hint] or bytes are not valid UTF-8.
fnnormalize_textpub fn normalize_text(s: String) -> Stringcrates/vox-bounded-fs/src/lib.rs#L42-L63Normalize source/text bytes for cross-platform consistency: strip one leading UTF-8 BOM and convert CRLF/CR line endings to LF. Pure, idempotent, and allocation-light (returns input unchanged when already clean). Shared by the compiler lexer and the runtime text-read functions.
fnread_utf8_path_capped_or_emptypub fn read_utf8_path_capped_or_empty(path: &Path) -> Stringcrates/vox-bounded-fs/src/lib.rs#L67-L69Same as [read_utf8_path_capped] but returns an empty string on any failure.
fnread_utf8_path_capped_optpub fn read_utf8_path_capped_opt(path: &Path) -> Option<String>crates/vox-bounded-fs/src/lib.rs#L73-L75Same as [read_utf8_path_capped] but returns None on any failure.
fnread_utf8_path_capped_asyncpub async fn read_utf8_path_capped_async(path: &Path) -> Result<String>crates/vox-bounded-fs/src/lib.rs#L79-L84Capped read on the blocking pool (for async call sites; avoids unbounded tokio::fs::read_to_string).