Difference between revisions of "Rust"

From RogueBasin
Jump to navigation Jump to search
m
(Bump Rust latest revision, add C influence)
Line 1: Line 1:
{{Programming language| name = Rust
{{Programming language| name = Rust
|company = Mozilla
|company = Mozilla
|influences = C++, Erlang, Haskell, Standard ML
|influences = C/C++, Erlang, Haskell, Standard ML
|updated = 2016-10-20 (1.12.1)
|updated = 2017-11-22 (1.22.1)
|status = Stable
|status = Stable
|licensing = Open Source (MIT License)
|licensing = Open Source (MIT License)

Revision as of 18:10, 4 December 2017

Rust
Programming Language
Company Mozilla
Influences C/C++, Erlang, Haskell, Standard ML
Updated 2017-11-22 (1.22.1)
Status Stable
Licensing Open Source (MIT License)
Platforms Linux, OS X, Windows, FreeBSD
Official site of Rust


Rust is a systems programming language from Mozilla Research. It is aiming to be a viable replacement for C++ and is used by Mozilla to write a next-generation web browser engine. Unlike most high-level programming languages that use garbage collection, Rust uses the scope-delimited memory management idiom of C++ with stronger enforcement at language level. It uses an abstraction idiom similar to Haskell's type classes instead of OO, and supports reasonably extensive generic programming with type parameters that can be constrained to implemented traits. It has a macro system.

The language and type system have been designed to make it impossible to create memory leaks or null pointer references outside regions explicitly marked as unsafe, while maintaining C++-style explicit memory handling. The cost for this is a somewhat complex core language with various smart pointer types and explicit value lifetime annotations.

Writing FFI bindings to C code is easy. The Cargo tool handles builds and dependencies to third-party packages. There is built-in unit test support.

Rust Roguelikes

  • [1] phage, 7DRL
  • [2] rhex
  • [3] Roguelike Tutorial, A port of the Complete Roguelike Tutorial, using python+libtcod.
  • [4] rg, still in very early stages