motte
Defensive mount and root workspace helper for terminal environments.
Purpose
motte (from Old English mot, a mound or defensive hillock) provides
workspace root detection, mount point resolution, path ancestry walking,
and defensive boundary enforcement for building secure terminal environments.
Features
- WorkspaceRoot — find project roots by marker file search
- MountPoint — represent and query filesystem mount boundaries
- PathAncestry — walk path components from leaf to root
- DefensiveBoundary — safe path resolution with traversal prevention
- Zero dependencies
Install
Usage
use ;
// Find workspace root by marker files
let root_finder = rust_defaults;
// Check mount points
let mp = new;
assert!;
// Defensive boundary for safe path resolution
let boundary = new;
let safe_path = boundary.resolve_safe.unwrap;
assert!;
License
MIT OR Apache-2.0