Experiment with Bun bundling for distributing the CLI as a single-file executable
After the meeting with @netmilk about the CLI, we should try using Bun to build a single-file executable of the CLI that can then be distributed ("eliminating" the requirement of having node installed/tagged along to run the CLI)
Initial testing shows that we might need oclif's help, as they rely heavily on finding the package.json, so that might need tweaking (or a replacement of CLI frameworks).
Let us know if you run into any issues with Bun
@Jarred-Sumner sorry to revive the dead, we are closer and closer to having bun-bundles for our CLI. It seems that building it with --sourcemap doesn't quite work on Linux, but I cnr on my mac.. https://github.com/apify/apify-cli/actions/runs/15228772365/job/42834142625?pr=810
Any tips on how to debug this?
Another issue: bundles built on windows x64 don't run for whatever reason on arm64, but building the same bundles on arm64 just works (and it still outputs x64 binaries). The non-baseline edition just exists, no output or nothing, the baseline one throws a weird internal error from yargs(?). And we cannot build from arm64 because setup-bun action doesn't work at all for whatever reason 😢 (and neither does the script)
We're bun-dling with bun! This is done :D