New programming languages come and go. Most of them remain nothing more than academic toys or niche novelties. Rust, development of which is sponsored by Mozilla, might be one of the exceptions. The new language reached the 1.0 milestone today, marking the point at which its feature set is stabilized and developers can start to use it without having to worry too much about their code getting broken by a major change.

Rust is an attempt to offer the performance and control of a language like C or C++, while making it much harder to write the kind of security-compromising bugs that are abundant in those languages. Key to this is the language's handling of memory and memory management.

Some of the biggest problems with C come from mishandling memory; predominantly reading or writing more data to a block of memory than the block of memory contains, reading or writing from blocks of memory that have been deallocated. Environments such as Java, .NET, and JavaScript handle these through a combination of bounds checking—ensuring that every attempt to read and write memory is constrained to the memory that has been allocated—and garbage collection—ensuring that memory is deallocated only once all the references to the memory (through which reads and writes are performed) are destroyed.

Together, these techniques protect against a great many developer mistakes and the security issues they cause, but they can come at a price; garbage collection tends to increase memory usage and can introduce some inconsistencies in program performance. They also often introduce issues when using old C or C++ libraries—often desirable because so much existing code uses these languages—and so special care has to be taken when mixing and matching.

Languages such as Java, C#, and JavaScript also do not use native code, instead tending to be converted to native code only at runtime. This has some advantages—programs need not be recompiled for different processor architectures, and program safety can be proven at runtime, a useful feature when running untrusted code (such as in the browser)—but also tends to limit performance. While there's no essential reason for this, and one day runtime code generation has the potential to consistently beat native code compilers, as things stand today, the highest performance comes of compiling once, and distributing native code.

Rust takes a very different approach. It uses native code, so it can offer high performance, and it does perform bounds checks, to provide some of its safety, but it doesn't depend on garbage collection to protect against memory misuse. Instead, it uses a notion of compiler-tracked memory ownership and object lifetimes. Objects allocated in memory can only have one owner (though ownership can be "borrowed" to allow objects to be passed to functions), and Rust ensures that the owners of objects have lifetimes that are at least as long as the objects themselves.

These decisions ensure that many of the typical C errors, such as freeing memory while other code is trying to use that memory, can't occur in Rust.

The language also includes built-in concurrency features and support for generics, and powerful macros.

These features should enable Rust to be competitive in terms of performance and memory usage with C and C++, without the same exposure to security flaws. Other languages have offered similar features, but never been anything more than academic novelties. The thing that makes Rust different is Mozilla's backing. Mozilla is developing an experimental, parallel browser engine in Rust called Servo, along with other components such as a Rust-based URL parser for the network stack.

While these won't be finding their way into Firefox any time soon—though a request to optionally include the Rust URL parser was recently opened—they mean that Rust, uniquely among niche languages, has a large and important software project that could one day use some amount of Rust code. Combined with an attractive feature set, this is a language that could well find some real-world success.