That said, in a similar vein, you could probably create a bundler that takes a shell script and bundles it with busybox to create a static program.
That said, in a similar vein, you could probably create a bundler that takes a shell script and bundles it with busybox to create a static program.
An alternative is to use crunchgen from NetBSD (also included with some of the later BSDs) which crunches full-featured, source tree versions of multiple utilities in a single, static binary. What busybox refers to as a "multi-call" binary.
It will be larger than busybox of course. I get evertyhing I need in a binary less than 5M.
So in theory I could build a feature that allows you to ship a self contained executable like you’ve described.
If this is something you’re genuinely interested in and my shell has the right kind of ergonomics for you, then feel free to leave a feature request:
> Standard library: we aim to add first-class support for a variety of frequently used/needed commands as builtins. you no longer need external programs to use them.
That's not going to be an easy task, and would basically entail porting those commands to go.