Linux Runs Inside PDF File with RISC-V Emulator

A talented high school student, Ading2210, has created a Linux distribution that runs inside a PDF file using a RISC-V emulator. The LinuxPDF project uses the TinyEMU emulator, similar to the popular DoomPDF project, which allows users to launch the operating system in any browser on Chromium with support for the PDFium library. A virtual keyboard is used to enter console commands, and both 64- and 32-bit versions are available for the root file system.

Contrary to expectations, PDF files can execute JavaScript code with its own standard library, supported by modern browsers like Chromium and Firefox. This enables computation within the PDF, albeit with limited input/output capabilities. Ading2210 compiled a modified version of TinyEMU’s RISC-V emulator in asm.js, which runs smoothly within the PDF.

This achievement is not unique, as programmers have previously turned everyday objects into DOOM machines using various approaches. LinuxPDF showcases the versatility and potential of the PDF file format, paving the way for future innovations. Learn more about LinuxPDF on GitHub and discover Ading2210’s creative work.

Source: https://80.lv/articles/you-can-now-run-linux-inside-a-pdf-file