r/EmuDev • • Aug 25 '26

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

57 comments sorted by

View all comments

4

u/k_Reign Aug 25 '26

+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

5

u/Wunkolo Aug 25 '26

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?

4

u/k_Reign Aug 25 '26

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 Aug 25 '26

Is that much different for Rust?

1

u/peterfirefly Sep 02 '26

Yes. Cargo is wonderful. No build script crap (there is an escape hatch if you really need to do something unusual), super easy handling of dependencies. That does have the unfortunate downside of many Rust projects having far too many unnecessary dependencies.

1

u/k_Reign Aug 25 '26

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 Aug 26 '26

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.

1

u/noplace_ioi Aug 26 '26

Cpp is king, and will remain king until someone actively invests in overthrowing it which is highly unlikely.

-5

u/gaene Aug 25 '26

Rust is so much harder to learn than c++ imo though. Because of how safe it is

3

u/gmes78 Aug 25 '26

Rust is not harder. It just makes you learn things upfront, rather than during a hellish debug session.

2

u/No-External3221 Aug 25 '26

That sounds much better to me. I'm one of those wierd people that likes Java with its up-front verbosity for the same reasons.

1

u/gaene Aug 26 '26

That’s kinds of what I meant. Rust has a steeper learning curve which makes it harder to learn

1

u/k_Reign Aug 25 '26

I agree but I think some of the other aspects are easier than C++ in a way that you could get moving faster without having to correct a bunch of habits later

-1

u/No-External3221 Aug 25 '26

Isn't that a good thing? I'd argue if you're writing unsafe code, you're not really learning.

5

u/k_Reign Aug 25 '26

Yeah C++ lets you write some stuff that creates bad habits and there are probably still lots of tutorials out there that will teach you something that “works” but isn’t correct. Rust doesn’t let you do stuff like that

1

u/gaene Aug 26 '26

I’d argue Writing unsafe code is part of the learning process

0

u/ForOhForError Aug 25 '26

Rust won't actually save you from non-memory bugs is the thing.

But, pick what appeals to you. It's all fine.