How ish-app/ish works
iSH is an iOS Linux shell: it runs Linux userspace programs through x86 user-mode emulation and translates their system calls. The principal workflow is launching a shell, executing instructions, and servicing its system calls through process, memory, and filesystem facilities, with filesystem and terminal behavior producing user-visible results. The README also describes an optimized threaded-code interpreter and command-line debugging. Several implementation links and iOS view relationships are not established by the sampled excerpts or README, so those are omitted rather than inferred.
Main entry points: main.c Runtime entry · task.h Process and tasks · calls.h Syscall interface · fs.c Filesystem syscalls
Components 21
iOS shell
- iOS app UI
app - Terminal UI
app/TerminalViewController.h - Terminal frontend
app/terminal/term.js
Execution runtime
- Runtime entry
main.c - Runtime setup
xX_main_Xx.h - x86 decoder
emu/decode.h - Threaded interpreter
asbestos/gen.c - CPU state
emu/cpu.h
Linux compatibility
- Syscall interface
kernel/calls.h - Process and tasks
kernel/task.h - Virtual memory
kernel/memory.h - Filesystem syscalls
kernel/fs.c - File descriptors
fs/fd.h - Filesystem backends
fs - Process filesystem
fs/proc/pid.c - Socket operations
fs/sock.c - Signal handling
kernel/signal.c
Runtime support
- Platform interface
platform/platform.h - Synchronization
util/sync.h
Other components
- Shell user
- Host OS
Connections 19
- Shell user → iOS app UI: uses
- iOS app UI → Terminal UI: presents
- Terminal UI → Terminal frontend: uses
- Runtime entry → x86 decoder: emulates x86
- Runtime entry → Syscall interface: translates syscalls
main.c - Runtime entry → Runtime setup: initializes
main.c - x86 decoder → CPU state: interprets
emu/decode.h - Threaded interpreter → CPU state: executes state
- Syscall interface → Process and tasks: uses task state
kernel/calls.h - Syscall interface → Filesystem syscalls: dispatches filesystem calls
kernel/fs.c - Filesystem syscalls → File descriptors: uses descriptors
kernel/fs.c - Filesystem syscalls → Filesystem backends: routes operations
kernel/fs.c - Process filesystem → Process and tasks: reads task state
fs/proc/pid.c - Socket operations → File descriptors: uses descriptors
fs/sock.c - Process and tasks → Virtual memory: tracks address space
kernel/task.h - Signal handling → Process and tasks: uses task state
kernel/signal.c - Runtime setup → Filesystem backends: configures runtime filesystems
xX_main_Xx.h - Runtime entry → Platform interface: runs on
- Filesystem backends → Host OS: accesses host facilities