Porting a CHIP-8 emulator to Rust

I’ve been meaning to learn the Rust language for quite some years and found only now the time to start this endeavor. I must say it has probably been for the best, as the language has clearly matured a lot since the last time I looked into it.

As a first project to try out Rust I ported Laurence Muller’s CHIP-8 emulator to it. It’s a simple C++ project and it took me only a day to port it to Rust.

You can download my port from GitHub.

There’s not much to write about the project itself apart that the original code used GLUT and the port uses SDL2. I also implemented basic audio support, but didn’t work on providing a realistic clock speed.

I can’t yet write something exhaustive about Rust, because I’m still learning it. What I can say up until now is that, apart some minor things which I dislike (snake-case: ugh), it seems fun to program in it. The amount of rules make the programming a bit more challenging, but it pays off in satisfaction once everything builds without complaints.

The only thing I can say is that I can’t clearly see a use-case for Rust. Yes, it’s a solid and secure language which is fun to use. But will it be used in the real world? I can see many use-cases for Go, not so many for Rust. What I hope is for Rust to mature some more and then to become stable, without going down the path to insanity like modern C++.

2 thoughts on “Porting a CHIP-8 emulator to Rust”

  1. You’re learning and sharing … always kind behavior Ntos 🙂

    What I often find astonishing is how low-skilled people like me start with “hello world !” scripts, while skilled people like you, start with complete/complex applications … and call them simple projects. I really envy you, indeed 🙂

    Maybe, once you’ve mastered it, you’ll write one of your great primers for this language too.
    The dot .net one is awesome!

    Best Regards,
    Tony

Leave a Reply to dpistelli Cancel reply

Your email address will not be published. Required fields are marked *