10 ms·
Musl is tired and Cosmopolitan wired, since it takes the fully static binary concept to a whole new level. SBCL should consider using it, since it lets your bin
by jart 6y ago
Musl is tired and Cosmopolitan wired, since it takes the fully static binary concept to a whole new level. SBCL should consider using it, since it lets your binaries run on Windows, Mac, FreeBSD, OpenBSD, and NetBSD too. https://github.com/jart/cosmopolitan https://github.com/jart/cosmopolitan See https://justine.lol/ape.html https://justine.lol/ape.html which talks about how the executable format is also a valid zip file, which was used to create a JavaScript interpreter that loads sources from itself in a single file. Another option for SBCL is to just use Cosmopolitan's research to implement the same thing from scratch. See files like https://github.com/jart/cosmopolitan/blob/master/libc/sysv/syscalls.sh https://github.com/jart/cosmopolitan/blob/master/libc/sysv/s... and https://github.com/jart/cosmopolitan/blob/master/libc/sysv/consts.sh https://github.com/jart/cosmopolitan/blob/master/libc/sysv/c...
- rcgorton 6y ago"tired and Cosmopolitan wired" This poster needs to be banned. Only relevant if you want an interpreter which runs an secondary interpreter, encapsulated in a .zip file.
- _roqj 6y agoCosmopolitan binaries aren't interpreted. They're just flat x86 binaries. It needs a 12kb runtime that's written in C. All the runtime does is (a) polyfills magic numbers for the SYSCALL instruction and (b) boot-load from BIOS to long mode on metal w/ linux kernel style negative memory page tables. So basically, it's just glue that takes care of the ugly low-level system details so you can bolt on whatever high level language interpreter you want. For example, the Wasm3 engine recently adopted it.