C++ vs Rust: What are the differences?
Developers describe C++ as "Has imperative, object-oriented and generic programming features, while also providing the facilities for low level memory manipulation". C++ compiles directly to a machine's native code, allowing it to be one of the fastest languages in the world, if optimized. On the other hand, Rust is detailed as "A safe, concurrent, practical language". Rust is a systems programming language that combines strong compile-time correctness guarantees with fast performance. It improves upon the ideas of other systems languages like C++ by providing guaranteed memory safety (no crashes, no data races) and complete control over the lifecycle of memory.
C++ and Rust can be categorized as "Languages" tools.
"Performance" is the top reason why over 146 developers like C++, while over 81 developers mention "Guaranteed memory safety" as the leading cause for choosing Rust.
Rust is an open source tool with 37.3K GitHub stars and 5.85K GitHub forks. Here's a link to Rust's open source repository on GitHub.
Lyft, OkCupid, and Twitch are some of the popular companies that use C++, whereas Rust is used by Dropbox, Sentry, and Roundscope Ukraine Labs. C++ has a broader approval, being mentioned in 199 company stacks & 371 developers stacks; compared to Rust, which is listed in 39 company stacks and 105 developer stacks.
What is C++?
What is Rust?
Want advice about which of these to choose?Ask the StackShare community!
Sign up to add, upvote and see more prosMake informed product decisions
Sign up to add, upvote and see more consMake informed product decisions
Sign up to get full access to all the companiesMake informed product decisions
Sign up to get full access to all the tool integrationsMake informed product decisions
C++ is used in Shiro (https://github.com/Marc3842h/shiro).
C++ is a high performance, low level programming language. Game servers need to run with fast performance to be able to reliably serve players across the globe.
Rust is used in Shirogane (https://github.com/Marc3842h/shirogane).
Shirogane is a osu! beatmap mirror built for shiro. We use Rust because of memory safe but still low level and high performance.
The most latency sensitive parts are written in C++. Due to our interconnected services architecture, we use either Python or C++ for each service, with the performance critical parts being C++14.
Used to write PHP extensions - AZTEC Decoder - License Driver scan - Axis2/C to PHP wrapper and Job-scheduler - Barbershop
Performance, zero-overhead abstractions and memory safety of the modern C++ language make this the perfect language for the project.