Rust
Systems language with memory safety and no garbage collector.
Replaces —

Who it's for
Rust provides the same hardware control and performance as C/C++ with enforced memory safety. Writing OS components, device drivers, and embedded firmware in Rust eliminates categories of security vulnerabilities (buffer overflows, use-after-free) common in C codebases. The Cargo ecosystem provides crates for hardware abstraction layers, no_std environments, and bare-metal targets.
Skip if your codebase is a large existing C/C++ project where an incremental migration is not planned. Rust interoperates with C via FFI, but partial rewrites require careful interface design at the boundary.
Rust's zero-cost async model and deterministic memory allocation make it well-suited for network services where tail latency matters. Unlike garbage-collected runtimes, Rust services do not pause for GC cycles. The official website notes Rust for network services requiring predictable performance and a tiny resource footprint.
Skip if your team lacks systems programming experience and latency requirements do not rule out occasional GC pauses. Go or a managed language will typically ship faster for services where GC behavior is acceptable.
Rust compiles to WebAssembly and integrates with JavaScript. The official website recommends Rust for building WebAssembly modules that accelerate JavaScript-heavy workloads, with publishing via npm and bundling via webpack. This path suits performance-critical browser code such as parsers, codecs, and simulation engines.
Skip if the WASM module does not require performance beyond what JavaScript can deliver. The Rust toolchain adds build complexity that is not worth the overhead for simple use cases.
Rust produces single static executables with no runtime dependency, making distribution straightforward: ship one binary per platform. CLI tools written in Rust start instantly with no interpreter overhead. The official website lists command-line tooling as a first-class use case, with the Rust ecosystem providing libraries for argument parsing, terminal output, and file operations.
Skip if you need rapid prototyping speed. Rust's compilation step and type system add friction compared to Python or shell scripts for tools you build and iterate on quickly or run only locally.
The problem
Systems programming languages like C and C++ give developers direct control over memory, but that control has a cost. Dangling pointers, use-after-free errors, buffer overflows, and data races are all invisible to the compiler. These bugs cause production crashes and security vulnerabilities that are expensive to diagnose after the fact. The alternatives come with their own costs. Adding commercial static analysis tools to C/C++ pipelines helps catch some of these issues but adds licensing costs and slower CI cycles. Switching to a managed language with garbage collection solves memory safety but introduces unpredictable latency pauses, which rules these options out for latency-sensitive services, embedded firmware, and contexts where runtime size matters.
How it works
The compiler enforces rules about memory ownership at compile time. Each value has one owner, and when ownership is transferred, the original binding becomes invalid. References are checked at compile time to ensure they never outlive the data they point to. This eliminates use-after-free errors, dangling pointers, and data races without runtime overhead or a garbage collector.
Rust's iterators, closures, and trait-based generics compile to machine code equivalent to hand-written loops. Using a higher-level abstraction carries no runtime overhead. The guarantees are enforced by the type system rather than a runtime check, so idiomatic high-level code runs at the same speed as carefully hand-optimized low-level code.
Cargo handles dependency resolution, compilation, testing, documentation generation, and publishing to crates.io in a single tool. Running 'cargo build' fetches dependencies and compiles the project. 'cargo test' runs the test suite. 'cargo doc' generates HTML documentation from inline doc comments.
Rust's type system makes data races a compile-time error. Sharing state across threads requires explicit synchronization, and the compiler rejects unsynchronized concurrent write access. This eliminates an entire category of hard-to-reproduce bugs without requiring a garbage collector or adding performance overhead.
Rust compiles to WebAssembly for running in browsers or serverless environments, and to bare-metal embedded targets including ARM Cortex-M and RISC-V. Both targets work without a standard library and benefit from the same memory-safety guarantees as server-side Rust code. The official website notes WebAssembly publishing via npm and webpack as a first-class use case.
Features
- Ownership and Borrow Checker
- Zero-Cost Abstractions
- Cargo: Package Manager and Build Tool
- Compile-Time Concurrency Safety
- WebAssembly and Embedded Targets
How to install
Install Rust on Linux or macOS using rustup, the official toolchain installer.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shRecommended for this setup
Strengths
- Memory Safety Without a Garbage Collector: Rust is the only mainstream systems language that provides compile-time memory-safety guarantees without a garbage collector. C and C++ require runtime sanitizers or commercial static analysis tools to catch the same class of bugs; Rust makes them type errors. The Rust Foundation notes hundreds of companies using Rust in production for this property.
- Dual MIT and Apache-2.0 License: Rust is distributed under both the MIT license and Apache-2.0. Both licenses permit unrestricted commercial use, modification, and redistribution. You can build commercial products on Rust, ship closed-source software written in it, or fork the compiler itself with no licensing fees.
- 120,000+ Stars and Active Development: The rust-lang/rust repository had over 120,000 GitHub stars and 18,700+ forks as of October 2026, with a last push recorded on October 14, 2026. The Rust Foundation provides organizational backing and the project receives contributions from hundreds of individual developers and corporate sponsors.
- Single Static Binaries for Simple Deployment: Rust compiles to self-contained executables with no runtime dependency. Deploying a Rust service means distributing one binary per platform: no interpreter, no JVM, no Node.js runtime to install on the target machine. This simplifies container images and bare-metal deployments alike.
Trade-offs
- Ownership Model Has a Learning Period: The ownership and borrow checker is the language's core safety mechanism and its steepest learning barrier. Developers from C++, Python, or JavaScript regularly find that valid-seeming code is rejected by the compiler for violating lifetime or borrowing rules. The compiler's error messages are detailed and suggest fixes, but learning to write idiomatic Rust takes deliberate practice even for experienced programmers.
- 12,500+ Open Issues in the Compiler Repository: The rust-lang/rust repository had over 12,500 open issues as of October 2026. While many reflect feature requests, language evolution, and documentation gaps rather than critical bugs, it means some language features and compiler edge cases remain unstable or produce unexpected behavior in niche configurations.
Tech stack
FAQ
Yes. Rust is distributed under the MIT license and Apache-2.0 license, both of which permit unrestricted commercial use, modification, and redistribution. There are no licensing fees or per-seat costs for using or building on Rust.
Rust uses an ownership model enforced by the borrow checker at compile time. Each value has exactly one owner, and references must not outlive the data they point to. The compiler rejects code that violates these rules, eliminating use-after-free errors and data races before the program runs. Memory is freed deterministically when the owning variable goes out of scope.
Cargo is Rust's built-in package manager and build tool. It handles dependency resolution, compilation, testing, and documentation generation for Rust projects. Libraries for Rust, called crates, are published on crates.io. Cargo serves a similar role to npm for Node.js or pip for Python, but it is integrated into the language toolchain from the start rather than a separately installed tool.
Yes. Rust has first-class support for bare-metal embedded targets including ARM Cortex-M and RISC-V, as noted in the official website's embedded section. Firmware can be written using the no_std attribute to exclude the standard library. The same compile-time memory safety guarantees apply to embedded code, and the Rust community maintains board support crates and hardware abstraction layers for common microcontrollers.
No. Memory in Rust is managed entirely by the ownership system at compile time. When a value's owner goes out of scope, the memory is freed immediately with no garbage collector involved. This makes Rust suitable for latency-sensitive systems and real-time applications where GC pauses are unacceptable, and for embedded targets where a GC runtime would be too large.