Difference between revisions of "Rust"

From RogueBasin
Jump to navigation Jump to search
(More info to get started with rust + libtcod)
(Small cleanup)
Line 2: Line 2:
|company = Mozilla
|company = Mozilla
|influences = C/C++, Erlang, Haskell, Standard ML
|influences = C/C++, Erlang, Haskell, Standard ML
|updated = 2017-11-22 (1.22.1)
|updated = 2018-06-05 (1.26.2)<br/>(updates every 6 weeks)
|status = Stable
|status = Stable
|licensing = Open Source (MIT License)
|licensing = MIT / Apache2
|platforms = Linux, OS X, Windows, FreeBSD
|platforms = Linux, OS X, Windows, FreeBSD, Android, Webasm
|site = http://www.rust-lang.org/}}
|site = http://www.rust-lang.org/}}


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.
Rust is a systems programming language from Mozilla Research. It is 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 the 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.
The language and type system have been designed to make it impossible to create memory safety violations 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 the occasional need for explicit lifetime annotations.
 
Writing FFI bindings to C code is easy. The [https://crates.io/ Cargo] tool handles builds and dependencies to third-party packages. There is built-in unit test support.


Writing FFI bindings to C code is easy. The [https://crates.io/ Cargo] tool handles builds and dependencies to third-party packages. There is built-in unit test and benchmark support.


==Rust Libraries==  
==Rust Libraries==  

Revision as of 17:20, 18 June 2018

Rust
Programming Language
Company Mozilla
Influences C/C++, Erlang, Haskell, Standard ML
Updated 2018-06-05 (1.26.2)
(updates every 6 weeks)
Status Stable
Licensing MIT / Apache2
Platforms Linux, OS X, Windows, FreeBSD, Android, Webasm
Official site of Rust


Rust is a systems programming language from Mozilla Research. It is 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 the 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 safety violations 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 the occasional need for explicit 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 and benchmark support.

Rust Libraries

  • [1] tcod-rs: libtcod 1.5.1 bindings for Rust, last git commit: 2017-11-12

Rust Tutorials

Rust Roguelikes

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