Suramya's Blog : Welcome to my crazy life…

February 24, 2026

You can now run an actual x86 Simulator in a Browser using CSS without any Javascript

Filed under: Tech Related — Suramya @ 3:43 PM

When I think of CSS (Cascading Style Sheets) I think of it as a way to change presentation and styling of a web page, but it looks like it is a full fledged programming language now that can run an entire x86 CPU emulator without using any Javascript.

Lyra Rebane managed this feat where you can write programs in C, compile them to x86 machine code with GCC, and run them inside CSS. A demo is available at: https://lyra.horse/x86css/. The demo doesn’t work in Firefox but works great in Chrome/Chromium based browsers.

Lyra is going to post a blog in the near future explaining how it all works and I for one am eagerly waiting for it because this is a phenomenal achievement.

How??

I plan on writing a blog post that explains how this works as well as many of the tricks used. Bookmark my blog or add it to your RSS reader.
Surely you still need a little bit of JavaScript?

Nope, this is CSS-only!

There is a script tag on this site, which is there to provide a clock to the CSS – but this is only there to make the entire thing a bit faster and more stable. The CSS also has a JS-less clock implementation, so if you disable scripts on this site, it will still run. JavaScript is not required.

My CSS clock uses an animation combined with style container queries, which means you don’t need to interact with anything for the program to run, but it also means its a bit slower and less stable as a result. A hover-based clock, such as the one in Jane Ori’s CPU Hack, is fast and stable, but requires you to hold your mouse on the screen, which some people claim does not count as turing complete for whatever reason, so I wanted this demo to be fully functional with zero user input.

Source: @rebane2001@infosec.exchange

– Suramya

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress