Windows? Linux? Browser? Same Executable
This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).
A developer created a 13KB executable file that runs natively on Windows, Linux, and web browsers by exploiting how each platform parses file headers. The technique stitches together compressed versions of the same program (a snake game) using a PE header for Windows, shell script stub for Linux, and HTML tag for browsers. Each platform skips the 'garbage' meant for other platforms. While inspired by Cosmopolitan's APE format, this approach produces much smaller files with less complexity, though it's more of a proof-of-concept than a practical development pattern.
322 Impressions