Compiling Rust code on a Pentium 2 at 233MHz

480 points TwistedSoul21967

An answer for a question no one asked and no one wanted (except me) but using the Rust compiler version 1.56 and Cargo, both built from source for i586 machines I have been able to compile programs on a P2-233.

I did originally try to get it running on an original Pentium but due to some problems even after spending hours fiddling with FCF Protection and CET flags, I wasn't able to get Rust to run due to illegal opcodes being emitted by LLVM (endbr32), which excludes anything below a P2.

use tokio;
#[tokio::main]
async fn main() {
  println!("Hello World, I am a Pentium II");
}

Updating the Crates.io index the night before trying this took 2hr 40 minutes alone, most of which was git resolving deltas.

It took just under 5 hours to compile a few lines of code and its dependencies.

Sometimes I see people complain about how it took their machine 30 seconds to cold compile.

Maybe they should code on this and see if it changes their attitude :P

https://preview.redd.it/5uu1imu1fxma1.jpg?width=575&format=pjpg&auto=webp&v=enabled&s=ec0f57701dcc6fc60423efd297e63f2c1601cf7e

https://preview.redd.it/8wmg4xc2fxma1.jpg?width=904&format=pjpg&auto=webp&v=enabled&s=8de764f0c8a1f7b465dc8f8a7d36ea37e8456909