silk/os_host_input
Profiles: aarch64-apple-darwin, aarch64-unknown-linux-gnu, x86_64-unknown-linux-gnu.
Native HostInput provider backed by an owned process-input snapshot.
When to use
Capture NativeHostInput at the application boundary and move it into this provider. Portable code receives it through the mutable HostInput service and obtains independent owned results.
Details
Arguments and environment retain their captured bytes. Working-directory lookup observes the current process directory on each call. Dropping the provider releases the complete snapshot.
Gotchas
Available only on the supported native libc profiles. Capturing foreign input requires that its storage remain readable and unchanged throughout capture.
Import as OsHostInput with import silk.os_host_input { OsHostInput }.
Public declarations: 1.
OsHostInput
pub struct OsHostInputAn affine HostInput provider owning its argument and environment snapshot.
Associated function OsHostInput.make
pub fn make(inputs: NativeHostInput) -> OsHostInputMoves an already captured snapshot into the portable service provider.
Details
Construction reads no foreign state and performs no allocation.
Implementation HostInput for OsHostInput
impl HostInput for OsHostInputOperation argumentCount
argumentCount = OsHostInput.argumentCountOperation argument
argument = OsHostInput.argumentOperation variable
variable = OsHostInput.variableOperation workingDirectory
workingDirectory = OsHostInput.workingDirectory