High school student Allen Ding, who previously made a name for himself by running the classic shooter Doom in a PDF file, has taken his project a step further and built the ability to run Linux into the PDF file.
Image source: youtube.com/@vk6_
This project is a reimagining of what JavaScript can do with PDF. The source code is available on the developer’s GitHub page, and you can try LinuxPDF here — you’ll need a Chromium-based browser like Chrome, Edge, or Opera. LinuxPDF runs on a TinyEMU-based RISC-V emulator; the internals of the project have much in common with DoomPDF, also by the same developer. The system is controlled via a virtual keyboard below the main screen.
PDF was designed to display text and images, but it also supports JavaScript code. Adobe Acrobat includes the full JavaScript specification, including 3D rendering, monitor detection, and HTTP requests. Browser-based PDFs are somewhat limited in their capabilities, but they are still sufficient to run games and operating systems.
Launched via PDF, Linux has catastrophically low performance – the kernel takes about a minute to load, and there’s no way to fix it because Chromium has a built-in version of the V8 engine without JIT compiler support. The system is 32-bit by default, but you can fork the project on GitHub and create a 64-bit version, which, however, will work even slower.