|
|
|
|
|
by reactordev
883 days ago
|
|
Is this done in zig in the core bun runtime or is it implemented as part of the standard bun lib? How much perf is there? Small commands like cd or ls I'm less interested in. You say you provide your own shell... bsh, zigsh, what? |
|
The parser, lexer, interpreter, process execution and builtin commands are all implemented in Zig.
There’s a JS wrapper that extends Promise but JS doesn’t do much else.
The performance of the interpreter probably isn’t as good as bash, but the builtin commands should be competitive with GNU coreutils. We have spent a lot of time optimizing our node:fs implementation and this code is implemented similarly. We expect most scripts to be simple one-liners since you can use JS for anything more complicated.