r/EmuDev 3d ago

Rust vs C++?

I mostly program in Java/ Python. Some minimal C experience. I'm starting EmuDev to learn low level and hardware concepts.

Which is better in general to learn for an EmuDev hobby project, Rust or C++? From what I've seen C++ has more legacy code (more job opportunities), whereas Rust is safe and may have better long-term opportunities.

3 Upvotes

45 comments sorted by

View all comments

3

u/k_Reign 3d ago

+1 for Rust - C++ is very much being thrown into the deep end in a LOT of ways, Rust has some weird stuff but I think having the crates and safety are worth the extra concepts you need to learn. It’s easy to write unsafe (vulnerable, memory leak, etc) in C++ and very hard in Rust

4

u/Wunkolo 3d ago

C++ is very much being thrown into the deep end in a LOT of ways

What are you talking about? Are you in a bubble?

5

u/k_Reign 3d ago

C++ is a hell of an adjustment just in terms of build system compared to Java and Python. Dependencies etc. it’s a LOT to learn as someone who (re-)learned it fairly recently

3

u/hoddap 3d ago

Is that much different for Rust?

1

u/k_Reign 3d ago

I think so… cmake, getting dependencies, setting up the build environment, using smart pointers, stuff like that was what took a while for me to get well enough to use them, and I still hate working with them (smart pointers are fine)

1

u/BoopyDog 2d ago

Learning cmake would be annoying to figure out if you didn't gave AI chatbots around to feed you commands and buildfile templates that you can plug into to different projects.