Rust programming by example : enter the world of Rust by building engaging, concurrent, reactive, and robust applications /
Rust is an open source, safe, concurrent, practical language created by Mozilla. It runs blazingly fast, prevents segfaults, and guarantees safety. This book gets you started with essential software development by guiding you through the different aspects of Rust programming. With this approach, you...
Clasificación: | Libro Electrónico |
---|---|
Autores principales: | , |
Formato: | Electrónico eBook |
Idioma: | Inglés |
Publicado: |
Birmingham, UK :
Packt Publishing,
2018.
|
Edición: | First edition. |
Temas: | |
Acceso en línea: | Texto completo (Requiere registro previo con correo institucional) |
Tabla de Contenidos:
- Intro; Cover; Copyright and Credits; Packt Upsell; Contributors; Table of Contents; Preface; Chapter 1: Basics of Rust; Getting to know Rust; Installing Rust; Windows; Linux/Mac ; Test your installation; Documentation and reference; Main function; Variables; Built-in data types; Integer types; Floating-point types; Boolean type; Character type; Control flow; Writing a condition; Creating while loops; Creating functions; Creating structures; References; Clone types; Copy types; Mutable references; Methods; Constructors; Tuples; Enumerations; Pattern matching; Irrefutable patterns; Traits.
- Default methodsAssociated types; Rules; Generics; The Option type; Arrays; Slices; For loops; Macros; Multiple pattern rules; Repetitions; Optional quantifier; Summary; Chapter 2: Starting with SDL; Understanding Rust crates; Installing SDL2; Installing SDL2 on Linux; Installing SDL2 on Mac; Installing SDL2 on Windows; Windows with Build Script; Windows (MinGW); Windows (MSVC); Setting up your Rust project; Cargo and crates.io; The docs.rs documentation; Back to our Cargo.toml file; Rust's modules; Tetris; Creating a window; Drawing; Playing with Options; Solution; Loading images.
- Installing SDL2_image on MacInstalling SDL2_image on Linux; Installing SDL2_image on Windows; Playing with features; Playing with images; Handling files; Saving/loading high scores; Iterators; Reading formatted data from files; Summary; Chapter 3: Events and Basic Game Mechanisms; Writing Tetris; Tetrimino; Creating tetriminos; Generating a tetrimino; Rotating a tetrimino; Tetris struct; Interacting with the game map; SDL events; Score, level, lines sent; Levels and lines sent; Highscores loading/overwriting; Summary; Chapter 4: Adding All Game Mechanisms.
- Getting started with game mechanismsRendering UI; Rendering initialization; Rendering; Playing with fonts; Install on OS X; Install on Linux; Other system/package manager; Loading font; Summary; Chapter 5: Creating a Music Player; Installing the prerequisite; Installing GTK+ on Linux; Installing GTK+ on Mac; Installing GTK+ on Windows; Creating your first window; Closure; Preventing the default behavior of an event; Creating a toolbar; Stock item; Improving the organization of the application; Adding tool button events; Lifetime; Ownership; Containers; Types of containers; The Box container.
- Adding a playlistThe MVC pattern; Opening MP3 files; Reference-counting pointer; ID3â#x80;#x94; MP3 metadata; Opening files with a file dialog; Deleting a song; Displaying the cover when playing a song; Summary; Chapter 6: Implementing the Engine of the Music Player; Installing the dependencies; Installing dependencies on Linux; Installing dependencies on Mac; Installing dependencies on Windows; Decoding MP3 files; Adding dependencies; Implementing an MP3 decoder; Getting the frame samples; Playing music; Event loop; Atomic reference counting; Mutual exclusion; Send trait; Sync trait.