Mozilla is Designing a New Programming Language Language Called Rust

Mozilla is designing a new multi-paradigm programming language called Rust. According to the Rust Project FAQ, the Rust team’s goal is “To design and implement a safe, concurrent, practical, static systems language.”

Rust began as a side project by Graydon Hoare in 2006, and Mozilla got involved in 2009 once the project was mature enough to run some basic tests. The language is now published on Github, but is in no sense production-ready.

Here’s a code sample from the Rust Language FAQ:

Here’s a list of features from the Language FAQ:

Safety oriented:


  • Memory safe. No null pointers, wild pointers, etc. Automatic storage management.

  • Mutability control. Immutable by default. No shared mutable state across tasks.

  • Dynamic execution safety: task failure / unwinding, trapping, logging. RAII / dtors.

  • Typestate system: ability to define complex invariants that hold over data structures.

Concurrency and efficiency oriented:


  • Explicit memory control. Layout and allocation control. Interior / value types.

  • Very lightweight tasks (coroutines). Cheap to spawn thousands-to-millions.

  • Stack iterators (effectively lambda-blocks w/o heap allocation).

  • Static, native compilation. Emits ELF / PE / Mach-o files.

  • Direct and simple interface to C code (switch stacks and call, ~8 insns).

Practicality oriented:


  • Multi-paradigm. pure-functional, concurrent-actor, imperative-procedural, OO.

  • First class functions with bindings.

  • Structurally-typed objects (no nominal types or type hierarchy).

  • Multi-platform. Developed on Windows, Linux, OSX.

  • UTF8 strings, assortment of machine-level types.

  • Works with existing native toolchains. GDB / Valgrind / Shark / etc.

  • Practical rule-breaking: can break safety rules, if explicit about where and how.

In addition to Hoare, other contributors include Ecma committee member Dave Herman and JavaScript creator and Mozilla CTO Brendan Eich.

Ed Borasky recently commented here at ReadWriteHack: “We flat out don’t need any more programming languages! What we need is *efficient* implementations of the ones we have now and IDEs / version control systems that enforce software engineering discipline.”

Do you agree? Do we have enough programming languages, or is there a need for more experimentation?

Facebook Comments