some way to assimilate the APEs?
it's possible to use --assimilate flag, or just use assimilate.com from redbean's site, to turn the portable executables into native format (e.g. normal ELF for linux)
that can be useful, because if you have wine installed, it'd execute the files instead of the system,
plus if it's native, some more security and usability features are possible
e.g. exec of redbean on openbsd, setuid/setgid on binary, probably helps with SElinux rules too
but also, it avoids the need to unpack the APE loader, which would allow usage on completely read-only filesystems
but I'm not sure how exactly it should be implemented,
to avoid the wine issue, one would have to either set up system-wide binfmt_misc rules, or assimilate BEFORE running the commands
but should the assimilation be an environment variable? a file? a command-line option? all of them?
or is this something left up to the user, out of scope for this template?
I personally think that assimilation, either of the two ways, should be an option of the template, but not sure which way to do it Wine catching on all APEs is annoying, though, and while I could set up that magic binfmt_misc hook, I think not requiring unpacking of the APE loader, would also be a general benefit, hence this issue and assimilating into a native file would allow usage in shebang of files, for example, which while unusual, wouldn't be that weird (there's specifically a flag to run redbean as just a lua interpreter), as you can have a lua engine with all your libraries and sqlite3 all bundled together, and run scripts using that (much like what, for example, love2d does)
I wouldn't mind it as a default-off option. I wouldn't use it personally, since the benefits of APE are the ability to cross systems, and assimilating reduces your ability to do so. Also it can't be undone without rebuilding the executable.