Skip to content
Unverified: This page has not yet been anchored to automated code tests.

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).