Innovative Executable Works Across Windows, Linux, and Browsers
Innovation in the Realm of Executables
Projects that enable the creation of a single executable functioning on different operating systems have been well known; however, recent discoveries by Kamila are opening new horizons. She has developed a file of just 13K that can run on both Windows and Linux, or even within web browsers.
The game implements a simple version of the "snake" game, with each variant compressed separately to meet the requirements of each platform. For example, to be compatible with Windows, the file begins with a PE header, but it has sufficient flexibility to allow valid shell scripts to bypass the Windows code when executed on Linux.
Thus, Windows skips the "junk" in the header, and this is the part that allows Linux to ignore the "junk" at the beginning of the file. Browsers, on the other hand, will ignore everything before an tag, facilitating the integration of this executable.
Although the idea is intriguing, it is inefficient and not recommended for practical use. Nonetheless, if someone were to wish to develop such projects, this is a clear sample of how it could be achieved.