You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Oliver Drobnik edited this page Oct 30, 2026
·
2 revisions
ShellKit
A virtualised shell-environment abstraction for Swift.
ShellKit owns the entire surface that an in-process shell host
(SwiftBash, SwiftScript, swift-js, …) needs to virtualise so command
implementations can be written once and run unchanged in two modes:
Virtualised — under an embedder. The embedder constructs a
Shell with custom IO sinks, a confined Sandbox, an enforced
NetworkConfig, etc., and binds it onto the current Task. Every
read of Shell.current inside the binding sees the embedder's
plumbing.
Passthrough — running standalone (swift run somecommand …).
Nothing is bound. Shell.current lazily returns
Shell.processDefault — stdio wraps FileHandle.standard*,
environment mirrors ProcessInfo.processInfo.environment, host
identity is HostInfo.real(), sandbox/network policy are nil
(no enforcement).
Same command body, both modes. That's the contract.
Pages
Generated by MissionControl from README.md and Docs/. Edit those, not this page.