Running Linux in a PDF: A RISC-V Emulator in Your Browser

2025-01-31
Running Linux in a PDF: A RISC-V Emulator in Your Browser

Developer @ading2210 has achieved the remarkable feat of running a Linux system inside a PDF file. Leveraging the Javascript engine within PDFs and an asm.js compiled version of the TinyEMU RISC-V emulator, a functional Linux environment is created. Output is displayed using ASCII characters, and input is managed through a virtual keyboard. While boot times are slow (30-60 seconds), the project showcases the surprising capabilities of the PDF format. The code is open-source and supports both 32-bit and 64-bit systems.

Development