Rust

From OSDev.wiki
Revision as of 16:58, 8 April 2015 by osdev>Virtlink (Expanded article)
Jump to navigation Jump to search

Rust is a new systems language under development by Mozilla, designed to offer better safety and concurrency than other, more traditional systems programming languages. The syntax is a C dialect with the familiar braces and semi-colons. It features constructs from imperative programming (such as if and while), functional programming (such as lambda's, multi-directional pattern matching and immutable variables) and object oriented languages (traits and objects).

Rust has a strong focus on memory safety and control. Object allocation happens on the stack by default, but they can explicitly be stored on the heap. Objects are automatically deallocated as soon as they are no longer needed. Rust's references prevent dangling pointers, null references, and out of bounds memory access.

Operating System Development

While Rust has its own runtime (that uses libc), Rust can easily be configured to compile programs without it. This gives developers the freedom to implement their own memory allocation and other low-level services. This makes Rust ideal for operating system development.

See Also