About 20 results
Open links in new tab
  1. Contents - Rust for the Polyglot Programmer - chiark

    Rust for the Polyglot Programmer Rust for the experienced programmer, a guide. See the Introduction for the rubric, goals, and non-goals. See the Colophon for other formats available, authorship and …

  2. Documentation and testing - Rust for the Polyglot Programmer

    Documentation and testing rustdoc Rust's documentation generator, rustdoc, can automatically generate API documentation from appropriate comments in the Rust source. You document an item with a /// …

  3. Introduction and overview - Rust for the Polyglot Programmer

    Introduction and overview There are many guides and introductions to Rust. This one is something different: it is intended for the experienced programmer who already knows many other programming …

  4. The concrete syntax has many influences. The basic function and expression syntax resembles “bracey” languages, but with some wrinkles. Notably: ( ) are not required around the control expression for if …

  5. Syntax - Rust for the Polyglot Programmer - chiark

    Syntax Rust distinguishes items, statements, and expressions. Control flow statements tend to require block expressions ({ }). Also very important are patterns, which are used for variable binding and sum …

  6. FFI - Rust for the Polyglot Programmer - chiark

    FFI Rust has a range of FFI support for interworking with other languages. Raw C FFI Built into the language, you can write extern "C" { ... } and both define and ...

  7. Types and patterns - Rust for the Polyglot Programmer - chiark

    Types and patterns Rust's type system is based on Hindley-Milner-style algebraic types, as seen in languages like ML and Haskell. The compiler will often infer the types of variables (including …

  8. Traits, methods - Rust for the Polyglot Programmer - chiark

    Traits, methods Methods The receiver.method(...) syntax is used to call a "method": a function whose first parameter is a variant on self; often &self or &mut self. (self is a keyword; you can't choose your …

  9. Stability - Rust for the Polyglot Programmer - chiark

    Stability The Rust Project and community value providing a stable platform, but also want to be able to make progress and changes. There are a number of facilities and practices which try to achieve …

  10. Macros and metaprogramming - Rust for the Polyglot Programmer

    Macros and metaprogramming Overview Rust itself has two macro systems and cargo has a hook for e.g. build-time code generation. Each has its own section in this chapter: "Macros by example" …