Enterprising developer somehow writes an x86 CPU emulator in plain CSS — no Javascript, no WASM, just stylesheet computing

1 week ago 18
hashes (Image credit: Getty)

Yes, you did read the headline correctly, and you'd be wise to fetch a cross, garlic, and a stake. Lyra Rebane, a madlady who dabbles in CSS and infosec, figured out she could leverage the power of contemporary implementations of the stylesheet language to emulate an x86 processor, all without even a single line of JavaScript, WASM, or any other such tomfoolery.

Go deeper with TH Premium: CPU

As the first question out of everyone's mouths will be "Can it run Doom?", the answer is that no, it cannot, or at least not yet. While the x86css emulator implements most of the x86 assembly, it's missing key functionality like interrupt handling, port input/output, and block-operation instructions, all key to making most any game as we know them. Perhaps more poignantly, Doom is a 32-bit program and requires a 32-bit CPU (80386 or above), 4 MB of RAM, and the ability to enter protected mode.

Cold-hearted developers like myself will also find some warmth in the fact that Rebane did not use any vibe-coding or AI bot assistance for writing this emulator. And as she points out, a bot could have hardly done this, as the necessary leaps in logic to force CSS to be a full-fledged state machine require some serious out-of-the-box thinking. Rebane points to Jane Ori's CSS CPU Hack as instrumental to her own ideas.

i built an entire x86 CPU emulator in CSS (no javascript)you can write programs in C, compile them to x86 machine code with GCC, and run them inside CSS pic.twitter.com/jU29iLZfbZFebruary 24, 2026

As to the reason or utility of such an enterprise, she simply stated that it was a fun project. Many developers (me included) have long made jokes when people mention HTML and CSS as "programming languages," and this is definitely a moment of harsh acceptance. Some commenters wonder if this implies that contemporary CSS might become a serious attack vector, but that seems unlikely given that Rebane had to create the machine to run the code with.

Google Preferred Source

Follow Tom's Hardware on Google News, or add us as a preferred source, to get our latest news, analysis, & reviews in your feeds.

Get Tom's Hardware's best news and in-depth reviews, straight to your inbox.

Bruno Ferreira is a contributing writer for Tom's Hardware. He has decades of experience with PC hardware and assorted sundries, alongside a career as a developer. He's obsessed with detail and has a tendency to ramble on the topics he loves. When not doing that, he's usually playing games, or at live music shows and festivals.

Read Entire Article