zshrs, a pure rust zsh superset UNIX shell with a JIT
I’ve been building zshrs, a drop-in zsh replacement that compiles shell code to bytecode and runs it on a custom VM with a Cranelift JIT. The obvious objection is that shell performance is dominated by exec, so why JIT it. That’s true for ls | grep foo, and zshrs won’t help you there. It matters for the code that isn’t spawning processes: parameter expansion, arithmetic, pattern matching, the loops in large completion systems, and the thousand-line prompt frameworks people actually run on every keystroke. Those are interpreted tree-walks in zsh and bytecode here. The bigger change is that a worker thread pool replaces fork/exec for builtins and function calls. This is where the semantics get
…