News for hackers. Stuff that matters.
Re:ZX – A tool for writing better scripts by mariansam on Saturday February 10, 2024 @02:23AM (#39324300)
How does this compare to the recently released Bun Shell?
Re:ZX – A tool for writing better scripts by Jarred on Saturday February 10, 2024 @02:38AM (#39324356)
Bun Shell implements a cross-platform bash-like shell, using builtins for popular commands like `rm`, `cd`, `which`, `ls` etc which support the same flags on Linux, macOS, and Windows. A lot of why we made it was for `bun install` to work on Windows without needing polyfill packages like `rimraf` or `cross-env` in package.json scripts.

zx uses the system-provided shell, which means it isn't cross-platform

For the commands Bun Shell implements as builtins, they typically run something like 10x - 20x faster than in zx on mac/linux because spawning processes is expensive (even more expensive on Windows)

Re:ZX – A tool for writing better scripts by skavi on Saturday February 10, 2024 @02:30AM (#39324325)
One (admittedly obvious) difference is that it runs on Node/V8 instead of Bun/JSC.
Re:ZX – A tool for writing better scripts by cerved on Saturday February 10, 2024 @02:36AM (#39324350)
can you elaborate the difference, besides the different names of the runtime?
Re:ZX – A tool for writing better scripts by skavi on Saturday February 10, 2024 @06:36AM (#39325417)
I think you’ll find far better answers than I can provide with a web search.
Re:ZX – A tool for writing better scripts by cerved on Sunday February 11, 2024 @12:48PM (#39336812)
I didn't which is why I asked