Rust: Difference between revisions

From OSDev.wiki
Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content added Content deleted
(Expanded article)
No edit summary
Line 7: Line 7:


== See Also ==
== See Also ==
* [http://www.rust-lang.org/ Rust Website]
* [https://web.archive.org/web/https://github.com/rust-lang/rust/wiki/Operating-system-development Operating Systems Development in Rust]
* [https://web.archive.org/web/https://github.com/rust-lang/rust/wiki/Operating-system-development Operating Systems Development in Rust]
* [[Rust Bare Bones]]
* [[Rust Bare Bones]]

Revision as of 16:58, 8 April 2015

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