by jeroenhd · 4y ago · 0 comments
Justine's impressive work on this subject makes me wonder if it's possible to build truly native applications using more complete toolsets and more modern languages. Multiplatform toy programs have existed for ages, but this SDK of sorts makes it possible to write executables that don't require manually tricking the compiler or adjusting your code for portability with inline assembly. As long as the program is statically compiled and contains the necessary drivers for things like syscalls, this should be perfectly possible, though the current implementation isn't exactly user friendly, relying on giant headers like https://justine.lol/cosmopolitan/cosmopolitan.h, statically linked components like https://justine.lol/cosmopolitan/crt.o and https://justine.lol/cosmopolitan/ape.o, and other such tweaks.
I'd love a Go/Rust compile target that just works regardless of operating system. As an added bonus, the bare metal nature would be excellent for platforms like Firecracker to run services without even needing to boot a kernel!
Especially for porting existing projects, I recommend against using the amalgamation as sometimes including everything all the time causes problems.
> Linux, Mac, Windows, FreeBSD, OpenBSD, NetBSD, and BIOS
1. Windows
2. Linux
3. Mac (which is a descendent of BSD, though with different kernel.)
4. BSD (including FreeBSD, OpenBSD, NetBSD)
The "OS" in BIOS doesn't stand for Operating System! It's Basic Input/Output System.
If so, ok, sure, then you have a point. Otherwise, no, those are three distinct OSes, and it's entirely correct to list them as such.
I know you can't mix macOS into that, so the "or 4 if I'm generous" is pretty unfair.
> The "OS" in BIOS doesn't stand for Operating System! It's Basic Input/Output System.
I don't think the author is claiming it means "Operating System", just that "BIOS" is a simple shorthand for "bare metal". Which no, isn't an "operating system" in the classical sense, but it is a standardized set of very low-level system services that sorta vaguely kinda acts like one. And if we consider UEFI rather than old-school PC-BIOS, it's even more like an OS.
Your comment just feels like pedantry for pedantry's sake (and not particularly correct pedantry, at that). Not sure what you're trying to accomplish here by minimizing the achievement.
I'm going to strongly disagree; BSD hasn't been a single operating system since 1995 (4.4BSD-Lite Release 2, the last BSD version from Berkeley). The extant BSDs are closely related, derive from a common original source, and semi-frequently share code back and forth, but they're separate systems with different code and different ABIs.
And of course it would list every BSD instance. Supporting them isn’t automatic when you’re taking about pre-compiles binaries because they can have subtly different ABIs. POSIX helps here but mostly at the source level, an ELF compiled for FreeBSD wouldn’t automatically run on OpenBSD nor NetBSD. The fact this does is unusual and deserves calling out.
Sorry to be a pedant, but DragonflyBSD is missing.
And, if you're shipping into an app store, there's really no point in using something like this.