Platform Abstractions
Architectural Layer: L1 Platform
Source Directory:src/platform
File Count: 17 source files
Cross-platform OS primitives (Linux, macOS, Windows), process control, and path handling.
Module Files & Detailed Reference
| Source File | Lines | Key Types | Responsibility |
|---|---|---|---|
| capabilities.rs | 279 | CapabilityShortfall, PlatformCapabilities, Capability | Typed host capability model. Callers ask whether the host can actuall... |
| errors.rs | 226 | PlatformError | Stable native-operation error taxonomy. Raw operating-system failures... |
| filesystem.rs | 362 | HostFilesystem | Host filesystem primitives behind one portable surface. Containment c... |
| macos.rs | 366 | ProcBsdInfoPartial | Native macOS backend behind the platform contract. Mechanisms used: -... |
| mod.rs | 253 | PlatformInfo, PlatformServices, PlatformFamily | Operating-system abstraction boundary for the runtime. The runtime st... |
| permissions.rs | 103 | FileSecurityOutcome | Credential-bearing file protection behind a portable contract. The se... |
| process.rs | 398 | PlatformProcessError | Native process-tree contract. The runtime guarantee is that a termina... |
| resources.rs | 280 | ResourceBudget, LimitOutcome | Semantic resource budgets separated from enforcement mechanisms. The ... |
| sandbox.rs | 189 | SandboxShortfall, IsolationLevel, SandboxReadiness | Capability-based sandbox vocabulary. Higher layers request an isolati... |
| shell.rs | 205 | ShellAvailability, ShellError, ShellRequest | Native shell selection behind an explicit contract. Direct argument-v... |
| terminal.rs | 141 | TerminalCapabilities, TerminalBackend | Terminal and console boundary. Runtime layers need dimensions, raw-mo... |
| acl.rs | 122 | AclOutcome | Windows credential-file protection via security descriptors. Unix mod... |
| conpty.rs | 164 | ConsoleSize, PseudoConsole | Windows Console Pseudo-console (ConPTY) backend surface. ConPTY is th... |
| job.rs | 471 | FileTime, IoCounters, JobAttributes | Windows Job Object backend for process-tree control and limits. Job O... |
| mod.rs | 147 | Functions/Traits | Windows native backend aggregator. Re-exports the focused Windows mec... |
| path.rs | 274 | Functions/Traits | Windows path security: containment without string-prefix traps. Windo... |
| shell.rs | 207 | ShellBackend | Native Windows shell backends. Direct argument-vector execution is al... |
src/platform/capabilities.rs
- Source Link:
src/platform/capabilities.rson GitHub - Lines of Code: 279 (10221 bytes)
Primary Responsibility
Typed host capability model. Callers ask whether the host can actually enforce a requirement instead of branching on the operating-system name. A capability can be fully present, absent, degraded, explicitly unsupported on this backend, or still unknown when probing was impossible. Linux: probes bubblewrap, cgroups, user namespaces macOS: probes libproc, setrlimit, sandbox-exec/Seatbelt, PTY Windows: probes Job Objects, ConPTY, cmd.exe/PowerShell, ACLs
Types & Trait Declarations
- Structs (2):
CapabilityShortfall,PlatformCapabilities - Enums (2):
Capability,CapabilityState