You Can Now Run Linux Inside A PDF File
cgshares.com
Not too long ago, a talented high school student known as Ading2210 managed to create a port of DOOM that runs inside a PDF file, playable right in your browser. Turns out, thats just the beginning of what the popular format can do. Ading2210 took it even further by packing a pretty much functional Linux distribution inside the PDF.This is Linux running inside a PDF file via a RISC-V emulator, which is based on TinyEMU. Working ina very similar way to the DoomPDF project, LinuxPDF can be launched in any browser on the Chromium engine with support for the PDFium library. A virtual keyboard is used to enter console commands. Both 64- and 32-bit versions are possible for the root file system. You can try LinuxPDF here and lean more about it on GitHub.As Ading2210 explained, you might expect PDF files to only consist of static documents. Surprisingly, the PDF file format supports Javascript with its own separate standard library. Modern browsers (Chromium, Firefox) implement this as part of their PDF engines. However, the APIs available in the browser are much more limited. This allows us to do any sort of computation inside the PDF, just with some very limited IO.C code can be compiled to run within a PDF using an old version of Emscripten that targets asm.js instead of WebAssembly. With this, the developer could compile a modified version of the TinyEMU RISC-V emulator to asm.js, which can be run within the PDF. For the input and output, they reused the same display code used for DoomPDF. It works by using a separate text field for each row of pixels on the screen, whose contents are set to various ASCII characters.Over the years, programmers have turned some seriously unexpected objects into DOOM machines, from pregnancy tests and LEGO bricks to Windows Notepad and Blenders Geometry Nodes. Its also been run on hacking conference badges, quantum computers, and even a Microsoft Word file. Dont miss whats next from these skilled hands and join our 80 Level Talent platformand ournew Discord server, follow us on Instagram,Twitter,LinkedIn,Telegram,TikTok, andThreads, where we share breakdowns, the latest news, awesome artworks, and more.Source link The post You Can Now Run Linux Inside A PDF File appeared first on CG SHARES.
0 Commentaires ·0 Parts ·67 Vue