Rust

Effective Rust: 35 Specific Ways to Improve Your Rust Code - David Drysdale

2024
english

 Rust's popularity is growing, due in part to features like memory safety, type safety, and thread safety. But these same elements can also make learning Rust a challenge, even for experienced programmers. This practical guide helps you make the transition to writing idiomatic Rust—while also making full use of Rust's type system, safety guarantees, and burgeoning ecosystem.

 If you're a software engineer who has experience with an existing compiled language, or if you've struggled to convert a basic understanding of Rust syntax into working programs, this book is for you. By focusing on the conceptual differences between Rust and other compiled languages, and by providing specific recommendations that programmers can easily follow, Effective Rust will soon have you writing fluent Rust, not just badly translated C++.

  • Understand the structure of Rust's type system
  • Learn Rust idioms for error handling, iteration, and more
  • Discover how to work with Rust's crate ecosystem
  • Use Rust's type system to express your design
  • Win fights with the borrow checker
  • Build a robust project that takes full advantage of the Rust tooling ecosystem
Перейти >

Black Hat Rust - Sylvain Kerkour

2022
english

 Whether in movies or mainstream media, hackers are often romanticized: they are painted as black magic wizards, nasty criminals, or, in the worst cases, as thieves with a hood and a crowbar.

 In reality, the spectrum of the profile of the attackers is extremely large, from the bored teenager exploring the internet to sovereign State's armies as well as the unhappy former employee.
 What are the motivations of the attackers? How can they break seemingly so easily into any network? What do they do to their victims?
 We will put on our black hat and explore the world of offensive security, whether it be cyber attacks, cybercrimes, or cyberwar.
 Scanners, exploits, phishing toolkit, implants... From theory to practice, we will explore the arcane of offensive security and build our own offensive tools with the Rust programming language, Stack Overflow's most loved language for five years in a row.
 Which programming language allows to craft shellcodes, build servers, create phishing pages? Before Rust, none! Rust is the long-awaited one-size-fits-all programming language meeting all those requirements thanks to its unparalleled guarantees and feature set. Here is why.

Перейти >

Rust Web Development with Rocket - Karuna Murti

2022
english

 Looking for a fast, powerful, and intuitive framework to build web applications? This Rust book will help you kickstart your web development journey and take your Rust programming skills to the next level as you uncover the power of Rocket - a fast, flexible, and fun framework powered by Rust.

 Rust Web Development with Rocket wastes no time in getting you up to speed with what Rust is and how to use it. You'll discover what makes it so productive and reliable, eventually mastering all of the concepts you need to play with the Rocket framework while developing a wide set of web development skills. Throughout this book, you'll be able to walk through a hands-on project, covering everything that goes into making advanced web applications, and get to grips with the ins and outs of Rocket development, including error handling, Rust vectors, and wrappers. You'll also learn how to use synchronous and asynchronous programming to improve application performance and make processing user content easy.

 By the end of the book, you'll have answers to all your questions about creating a web application using the Rust language and the Rocket web framework.

What you will learn

  • Master the basics of Rust, such as its syntax, packages, and tools
  • Get to grips with Rocket's tooling and ecosystem
  • Extend your Rocket applications using Rust and third-party libraries
  • Create a full-fledged web app with Rocket that handles user content
  • Write pattern-matching logic and handle Rust object lifetimes
  • Use APIs and async programming to make your apps secure and reliable
  • Test your Rocket application and deploy it to production
  • Containerize and scale your applications for maximum efficiency

Who this book is for

 This web development book is for software engineers who want to learn how to use the Rocket framework to build web applications. Although not mandatory, basic knowledge of the Rust programming language will help you understand the topics covered easily.

Перейти >

Rust for Network Programming and Automation - Brian Anderson

2023
english

Automate Network Infrastructure, Optimize Network Performance and Analyze Packets with Rust Ecosystem

 

 Rust for Network Programming and Automation is a pragmatic guide that trains you through Rust to design networks and begin with automating network administration. The book introduces you to Rust's powerful libraries and commands essential for designing, administering, and automating networks. You will learn how to use Rust's networking libraries like tokio, mio and rust-async to create scalable and efficient network applications.

 The book provides a wide range of practical examples and use cases, which help simplify complex coding concepts and ensure you understand the netwprk programming in-depth. You will discover how to establish network protocols like TCP and IP networks, run packet and network analysis, measure performance indicators and set up monitoring alerts and notifications. The book is an excellent resource for network engineers and administrators who want to understand Rust programming for networking.

 The author of "Rust for Network Programming and Automation" has a wealth of experience in network programming and automation with practical insights.

Key Learnings

  • Use Rust to automate network configuration, deployment, and maintenance tasks
  • Capture and inspect packets, decode protocols, and analyze network traffic
  • Set up monitoring alerts and notifications, and manage network infrastructure
  • Create scripts and applications that automate repetitive network tasks
  • Monitor network performance indicators like latency, throughput, and packet loss
  • Understand Rust's syntax, data types, control structures, and functions
  • Make use of Rust's networking libraries like Tokio, mio and rust-async to create networking programs
  • Establish network connections and handle data transmission between different device

Audience

 The book is perfect for anyone who wants to master Rust programming for network automation and gain a competitive edge in the field. Whether a beginner or an experienced programmer, this book will provide the knowledge and skills you need to excel in network programming and automation using Rust.

Перейти >

Rust In Practice - Rustacean Team

2023
english

 Rust In Practice is an ultimate fast-paced guide for anyone looking to become a practitioner of the rust programming from day 1. This book covers everything from the basics of Rust programming to building robust and efficient applications.

 Starting with the fundamentals, this book guides you through the syntax and semantics of the Rust language, including its unique ownership model and type system. You'll learn about common data types, control flow, error handling, and more.

 As you progress through the book, you'll dive deeper into advanced topics such as building programs, rust libraries and crates, using the standard library, and working with external crates. You'll also learn how to write concurrent and parallel code, take advantage of Rust's built-in testing features, and use popular Rust frameworks and libraries.

 The book also provides hands-on examples and exercises to help you practice and apply the concepts you've learned. By the end of this book, you'll have a solid understanding of Rust programming and be well-equipped to start building your own robust and efficient applications. With clear explanations, practical examples, and expert advice, this book will help you get an edge on Rust programming and become proficient in building and testing Rust applications, right from day one.

 

Key Learnings

  • Get well versed with cargo, different cargo commands
  • Understanding data types, ownership, and borrowing
  • Write flexible, efficient code with traits and generics
  • Make use of closures, iterators, and asynchronous programming to write multi-threaded programs
  • Utilizing collections, strings, text, input and output, macros, and avoiding unsafe codes
  • Run code testing on different types of rust programs and applications
  • 50+ examples covered to demonstrate every feature and functionality of rust
Перейти >

Rust Servers, Services, and Apps - Prabhu Eshwarla

2023
english

 The blazingly fast, safe, and efficient Rust language has been voted “most loved” for multiple consecutive years on the StackOverflow survey. Rust Server, Services, and Apps shows you why! Inside, you’ll build web servers, RESTful services, server-rendered apps, and client frontends just using Rust. You’ll learn to write code with small and predictable resource footprints, and build high-performing applications with unmatched safety and reliability.
 
 Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

About the technology

 Build speedy, stable, and safe web servers in Rust! With a unique approach to memory management and concurrency, Rust excels at getting the low-level details right so your applications run fast and flawlessly. And Rust’s incredible compiler helps you avoid expensive mistakes when you’re deploying web services and other core components in production.

About the book

 Rust Servers, Services, and Apps shows you how to create modern distributed web apps using the Rust language. You’ll start with the basics: building a simple HTTP server and a RESTful web service. Then, you’ll make them production ready by adding security, database interactivity, and error handling. Finally, you’ll tackle a digital storefront service, create a single page app, and dig into asynchronous programming. All examples are fully illustrated and include annotated code you can easily adapt to your own projects.

What's inside

  • Craft resilient and secure RESTful APIs
  • Package and deploy web services
  • Refactor fearlessly thanks to Rust’s guaranteed safety
  • Slash costs with Rust’s runtime and compile-time optimizations
  • Asynchronous programming with Rust

About the reader

 For web developers who know the basics of Rust.

Перейти >

Practical Rust Projects. 2 Ed - Andrew Rzeznik, Shing Lyu

2023
english

 Go beyond the basics and build complete applications using the Rust programming language, updated for Rust 2021 edition. The applications you'll build over the course of this book include a high-performance web client, an embedded computer (for a robot, for example), a game, a serverless web app, and an application that incorporates AI and machine learning.

Each chapter is organized in the following format: what the kind of should application look like; requirements and user stories of our example program; an introduction to the Rust libraries used; the actual implementation of the example program, including common pitfalls and their solutions; and a brief comparison of libraries for building each application, if there is no clear preference.

Practical Rust Projects, Second Edition will open your eyes to how Rust can be put to practical, real-world use. After reading this book, you will be able to use Rust to build a variety of your own projects.

What You Will Learn

  • Explore practical Rust programming language-based projects, examples and case studies
  • Create a GUI
  • Build a high performance web Front-end using WebAssembly
  • Develop REST APIs using Rust
  • Go serverless to develop a cloud application using the Amazon AWS Rust SDK
  • Create a game using Rust, along with AI and machine learning apps

Who This Book Is For

Those with basic Rust knowledge who want to learn more about how to apply Rust in real-world scenarios.

Перейти >

Rust for C++ Programmers - Mustafif Khan

2023
C++
english

 Rust is one of the most loved programming languages among developers. It is rapidly being adopted as the industry moves towards memory-safety systems programming languages. If you want to switch from C/C++ to Rust, this book is for you.

 “Rust for C++ Programmers” is the perfect guide to help you master the Rust programming language. Beginning with its evolution and comparison to C/C++, the book will help you learn how to install and use the powerful Cargo package manager. The book then covers key topics such as bindings and mutability, ownership, conditionals, loops, functions, structs and enums, and more. The book also explains how to handle errors in Rust. Furthermore, the book explores advanced topics such as smart pointers, concurrency, and even building a desktop application using GTK.

 By the end of the book, you will be able to build powerful and resilient apps with Rust.

What you will learn

● Create concurrent programs in Rust using threads.

● Learn how to build a desktop app using GTK.

● Understand how and when (not) to use Unsafe Rust.

● Get familiar with the common error handling patterns in Rust.

● Learn how to build a Desktop app using Tauri.

Who this book is for

This book is for programmers who are familiar with C/C++ and are looking to add Rust to their toolbelt.

Перейти >

Rust в действии - Тим Макнамара

2023
русский

 Книга о прикладных аспектах языка программирования Rust, описывающая внутреннее устройство языка и сферы его использования. Rust рассматривается как современное дополнение для С при программировании ядра ОС и при системном программировании, а также как низкоуровневый скоростной язык, обеспечивающий максимальную производительность. Объяснены тонкости работы с процессором, многопоточное программирование, работа с памятью, а также взаимодействие с Linux. Изложенный материал позволяет как писать современные приложения на Rust с нуля, так и внедрять Rust в сложившуюся базу кода.

Книга ориентирована на специалистов по C, Linux, системному программированию и на всех, кто желает освоить Rust и сразу приступить к работе с ним.

Перейти >

The Rust Programming Language. 2 Ed - Carol Nichols, Steve Klabnik

2023
english

 With over 50,000 copies sold, The Rust Programming Language is the quintessential guide to programming in Rust. Thoroughly updated to Rust’s latest version, this edition is considered the language’s official documentation.

 The Rust Programming Language "covers everything you could want to know about the language."—Stack Overflow

 Rust has been repeatedly voted "Most Loved Language" on the StackOverflow Developer Survey.


 The Rust Programming Language, 2nd Edition is the official guide to Rust 2021: an open source systems programming language that will help you write faster, more reliable software. Rust provides control of low-level details along with high-level ergonomics, allowing you to improve productivity and eliminate the hassle traditionally associated with low-level languages.

 Klabnik and Nichols, alumni of the Rust Core Team, share their knowledge to help you get the most out of Rust’s features so that you can create robust and scalable programs. You’ll begin with basics like creating functions, choosing data types, and binding variables, then move on to more advanced concepts, such as:
 

  • Ownership and borrowing, lifetimes, generics, traits, and trait objects to communicate your program’s constraints to the compiler
  • Smart pointers and multithreading, and how ownership interacts with them to enable fearless concurrency
  • How to use Cargo, Rust’s built-in package manager, to build, document your code, and manage dependencies
  • The best ways to test, handle errors, refactor, and take advantage of expressive pattern matching


 In addition to the countless code examples, you’ll find three chapters dedicated to building complete projects: a number-guessing game, a Rust implementation of a command line tool, and a multithreaded server.

Перейти >

Game Development with Rust and WebAssembly - Eric Smith

2022
english

 The Rust programming language has held the most-loved technology ranking on Stack Overflow for 6 years running, while JavaScript has been the most-used programming language for 9 years straight as it runs on every web browser. Now, thanks to WebAssembly (or Wasm), you can use the language you love on the platform that's everywhere.

 This book is an easy-to-follow reference to help you develop your own games, teaching you all about game development and how to create an endless runner from scratch. You'll begin by drawing simple graphics in the browser window, and then learn how to move the main character across the screen. You'll also create a game loop, a renderer, and more, all written entirely in Rust. After getting simple shapes onto the screen, you'll scale the challenge by adding sprites, sounds, and user input. As you advance, you'll discover how to implement a procedurally generated world. Finally, you'll learn how to keep your Rust code clean and organized so you can continue to implement new features and deploy your app on the web.

 By the end of this Rust programming book, you'll build a 2D game in Rust, deploy it to the web, and be confident enough to start building your own games.

What you will learn

  • Build and deploy a Rust application to the web using WebAssembly
  • Use wasm-bindgen and the Canvas API to draw real-time graphics
  • Write a game loop and take keyboard input for dynamic action
  • Explore collision detection and create a dynamic character that can jump on and off platforms and fall down holes
  • Manage animations using state machines
  • Generate levels procedurally for an endless runner
  • Load and display sprites and sprite sheets for animations
  • Test, refactor, and keep your code clean and maintainable

 Who this book is for

 This game development book is for developers interested in Rust who want to create and deploy 2D games to the web. Game developers looking to build a game on the web platform using WebAssembly without C++ programming or web developers who want to explore WebAssembly along with JavaScript web will also find this book useful. The book will also help Rust developers who want to move from the server side to the client side by familiarizing them with the WebAssembly toolchain. Basic knowledge of Rust programming is assumed.

Перейти >

Command-Line Rust - Ken Youens-Clark

2022
english

 For several consecutive years, Rust has been voted "most loved programming language" in Stack Overflow's annual developer survey. This open source systems programming language is now used for everything from game engines and operating systems to browser components and virtual reality simulation engines. But Rust is also an incredibly complex language with a notoriously difficult learning curve.


 Rather than focus on the language as a whole, this guide teaches Rust using a single small, complete, focused program in each chapter. Author Ken Youens-Clark shows you how to start, write, and test each of these programs to create a finished product. You'll learn how to handle errors in Rust, read and write files, and use regular expressions, Rust types, structs, and more.

 Discover how to:

  • Use Rust's standard libraries and data types such as strings, vectors, dictionaries, and sets to create systems programs
  • Write and test Rust programs and functions
  • Read and write files, including stdin, stdout, and stderr
  • Document and validate command-line arguments
  • Write programs that fail gracefully
  • Parse raw and delimited text
  • Use and control randomness
Перейти >

Rust Web Programming. 2 Ed - Maxwell Flitton

2023
english

Are safety and high performance a big concern for you while developing web applications? With this practical Rust book, you’ll discover how you can implement Rust on the web to achieve the desired performance and security as you learn techniques and tooling to build fully operational web apps. In this second edition, you’ll get hands-on with implementing emerging Rust web frameworks, including Actix, Rocket, and Hyper. It also features HTTPS configuration on AWS when deploying a web application and introduces you to Terraform for automating the building of web infrastructure on AWS. What’s more, this edition also covers advanced async topics. Built on the Tokio async runtime, this explores TCP and framing, implementing async systems with the actor framework, and queuing tasks on Redis to be consumed by a number of worker nodes. Finally, you’ll go over best practices for packaging Rust servers in distroless Rust Docker images with database drivers, so your servers are a total size of 50Mb each. By the end of this book, you’ll have confidence in your skills to build robust, functional, and scalable web applications from scratch.

Перейти >

Zero To Production In Rust - Luca Palmieri

2021
english

 Zero To Production is the ideal starting point for your journey as a Rust backend developer.
 You will learn by doing: you will build a fully functional email newsletter API, starting from scratch.

You'll learn how to:

  • Navigate and leverage Rust's crates ecosystem
  • Structure your application to make it modular and extensible
  • Write tests, from single units to full-blown integration tests
  • Enforce your domain invariants using Rust's type system
  • Authenticate and authorize users of your API
  • Implement a robust error handling strategy
  • Observe the state of your application using structured logs
  • Set up an extensive continuous integration and continuous deployment pipeline for your Rust projects

 The book is composed of 11 chapters, for a grand total of 500 pages. All supporting code (including tests!) is available on GitHub.

Перейти >

Hands-on Rust - Herbert Wolverson

2021
english

 Rust is an exciting programming language that combines the power of C with memory safety, fearless concurrency, and productivity boosters. It offers closeto-the-metal power and performance, while also providing a safety net to avoid many of the more common bugs found in low-level languages. Because of its features, Rust is a very competitive systems and game development language and is currently enjoying rapid growth amongst industry giants, including Amazon, Google, Microsoft, and many game development houses.

 A great way to learn and study Rust is through game development. Don’t be discouraged by the scale and polish of AAA titles. Small indie games are fun, and hobby game development can kickstart careers in professional game dev or unrelated development fields. Every successful game developer started small, gradually gaining skills until they could work on the game of their dreams.

 In this book, you’ll learn Rust by walking through game development examples. You’ll gain knowledge and confidence in both Rust and game development as you work through a series of practical examples, building increasingly complicated games. The text emphasizes a pragmatic “learn by doing” approach. Theory sections are short and are followed by concrete examples for you to try. By the end of the book, you’ll have mastered the basics of the Rust language and be well-equipped for tackling more complicated game development problems.

Перейти >

Practical System programming for Rust developers - Prabhu Eshwarla

2020
english

 The modern software stack is evolving rapidly in size and complexity. Technology domains such as the cloud, the web, data science, machine learning, DevOps, containers, IoT, embedded systems, distributed ledgers, virtual and augmented reality, and artificial intelligence continue to evolve and specialize. This has resulted in a severe shortage of system software developers able to build out the system infrastructure components. Modern societies, businesses, and governments increasingly rely heavily on digital technologies, which puts greater emphasis on developing safe, reliable, and efficient systems software and software infrastructure that modern web and mobile applications are built on.

 System programming languages such as C/C++ have proved their mettle for decades in this domain, and provide a high degree of control and performance, but it is at the cost of memory safety.

 Higher-level languages such as Java, C#, Python, Ruby, and JavaScript provide memory safety but offer less control over memory layout, and suffer from garbage collection pauses.

 Rust is a modern, open source system programming language that promises the best of three worlds: the type safety of Java; the speed, expressiveness, and efficiency of C++; and memory safety without a garbage collector.

 This book adopts a unique three-step approach to teaching system programming in Rust. Each chapter in this book starts with an overview of the system programming fundamentals and kernel system calls for that topic in Unix-like operating systems (Unix/ Linux/macOS). You will then learn how to perform common system calls using the Rust Standard Library, and in a few cases, external crates, using abundant code snippets. This knowledge is then reinforced through a practical example project that you will build. Lastly, there are questions in each chapter to embed learning.

 By the end of this book, you will have a sound foundational understanding of how to use Rust to manage and control operating system resources such as memory, files, processes, threads, system environment, peripheral devices, networking interfaces, terminals, and shells, and you'll understand how to build cross-language bindings through FFI. Along the way, you will learn how to use the tools of the trade, and get a firm appreciation of the value Rust brings to build safe, performant, reliable, and efficient system-level software.

Перейти >

Rust Standard Library Cookbook - Daniel Durante, Jan Hohenheim

2018
english

 Mozilla's Rust is slowly gaining attention, with amazing features and a powerful library. This book will take you through varied recipes that will teach you how to leverage the standard library to implement efficient solutions.

 The book begins with a brief look at the basic modules of the standard library and collections. From there, the recipes will cover crates, which support file/directory handling and (de)serialization for the most common data formats. You will learn about crates related to advanced data structures, error handling, and networking. You will also learn to work with futures and experimental nightly features. The book also covers the most relevant external crates in Rust. You will be able to compose your own algorithms using the standard modules of the library.

 By the end of the book, you will be proficient at using the Rust Standard Library Cookbook.

Перейти >

Mastering Rust. 2 Ed - Rahul Sharma, Vesa Kaihlavirta

2018
english

 This book is about Rust, a programming language that empowers you to build all kinds of software systems, ranging from low-level embedded software to dynamic web applications. Rust is fast, reliable, and safe. It offers performance and safety guarantees that reach or even surpass C and C++, while still being a modern language with a relatively low barrier of entry. Rust drive toward incremental improvements, combined with its active and friendly community, promises a great future for the language.

 Rust is not a new language by design and doesn't try to reinvent the wheel. Rather, it's a language that has identified unique ideas, hidden away in research-prototype languages that never saw mass adoption. It brings those ideas together into a coherent composition and provides a practical language that lets you build safe software systems, while still being efficient.

Перейти >

Hands-On Concurrency with Rust - Brian L. Troutwine

2018
english

 Welcome. The aim of this book is to teach beginner and moderate Rust programmers how to exploit modern parallel machines in the Rust programming language. This book will contain a variety of information relevant specifically to the Rust programming language, especially with regard to its standard library, but it will also contain information that is more generally applicable but happens to be expressed in Rust. Rust itself is not a terribly inventive language. Its key contribution, from where I sit, is the mainstreaming of affine types with application to memory allocation tracking. In most other respects, it is a familiar systems programming language, one that ought to feel familiar—with a bit of adjustment—to those with a background in GC-less programming languages. This is a good thing, considering our aim here is to investigate concurrency—there is a wealth of information available in the papers and books written about this subject, and we understand and apply their concepts. This book will reference a number of such works, whose contexts are C++ , ATS, ADA, and similar languages.

Перейти >

Network Programming with Rust - Abhishek Chanda

2018
english

 Rust has steadily become one of the most important new programming languages in recent years. Like C or C++, Rust enables the developer to write code that is low-level enough to make Rust code quickly. And since Rust is memory-safe by design, it does not allow code that can crash on a null pointer exception. These properties make it a natural choice for writing low-level networking applications. This book will enable developers to get started with writing networking applications with Rust.

Перейти >

Hands-On Data Structures and Algorithms with Rust - Claus Matzinger

2019
english

 When I first made the effort of learning one programming language a year, I started with Ruby, then learned a bit of Scala, until, in 2015, I started with a very new language: Rust. My first attempts at creating a Slack (a team chat program) bot were somewhat successful but very frustrating. Being used to Python's flexibility with JSON data and permissive compiler, Rust's steep learning curve quickly took its toll.

 The next projects were more successful. A database driver, as well as my very own Internet of Things (IoT)-type client and server application for the Raspberry Pi, allowed me to collect temperature data in a rock-solid manner. Unlike Python, if the program compiled, it would almost certainly work as expected—and I loved it.

 Since then, a lot has changed. Big companies such as Microsoft and Amazon are picking up Rust as a way to create safe and fast code on embedded devices as well as in the cloud. With WebAssembly (Wasm), Rust is gaining traction in the web frontend space, and gaming companies are starting to build game engines in Rust. 2018 has been a great year for the technology and the Rust community, both of which will continue to grow in 2019 (and beyond).

 For this reason, I hope to provide a learning resource for creating more sophisticated Rust code from a practical angle. Wherever your journey leads you, learning about Rust and its various programming models will change your view of code for the better.

Перейти >

Beginning Rust Programming - Ric Messier

2021
english

 Save me from another “hello, world” book. Don’t make me have to skim or skip through a half dozen chapters before I can get to something that’s going to be useful to me. Or you, in this case. I can’t tell you the number of programming books I’ve purchased over the decades, hoping to actually learn the language, only to end up just not using the book because it wasn’t presented in a way that made a lot of sense to me. Instead of a dry explanation of how the language is constructed so you can try to put it all together in meaningful ways yourself, the purpose of this book is to jump straight into writing hopefully interesting or useful programs. Once we have the program, we can take a look at how it’s constructed. You’ll be learning by doing—or learning by example, if you prefer. I hope you’ll find this a more useful and practical way of learning Rust.

 Rust is an interesting language, as it turns out. Like so many other languages, it claims a C-like syntax, which is roughly correct but misses out on many important elements. Where Rust really shines is where C has introduced bad behavior in programming practices. This is more apparent as more have been using C as a language. Where C provides you with the gun and the bullets to shoot yourself in the foot, Rust provides you with necessary protections to keep you from injuring yourself or, from the perspective of the application, keeps the application from crashing. Rust is focused on protecting the memory space of the program, in part to provide a better ability for concurrent programming. After all, Rust is considered to be a systems programming language, meaning it is intended for applications that are lower level than those that a user directly interacts with.

 In addition to protections provided to the programmer, Rust has a reasonably active community that can be used not only for support but also to get additional functionality for your programs. There are a lot of third-party libraries. These libraries can make your life easier by introducing you to functionality without you needing to write it yourself.

 The idea behind this book is to introduce you to Rust in context, rather than via snippets that, by themselves, don’t work. You need all the surround to fully understand what is happening in the program. You’ll find this out when you are looking at example code sometimes. This is true with the Rust documentation: it’s like you need to fully understand the language to understand the examples you are looking at. This book doesn’t take that approach. It assumes that you don’t know the language, so every line in every program is explained in as much detail as is necessary to pull it all apart, since Rust can be a dense language in some ways. This means single lines can pack a lot of meaning and functionality.

 The one thing this book does not assume, though, is that you are coming to programming completely fresh. You will see examples for the programs written in Rust also presented in other programming languages. This may be helpful if you come from another language like C or Python, for instance, but want to learn Rust. Seeing the approach in a language you know before translating it into Rust may be beneficial. If you don’t know those other languages, you can skip through those examples and jump to the explanation of how to write a program for the problem under discussion in Rust. You can still compare the other languages to Rust as you are going through so you can better understand Rust and how it is different from other languages.

Перейти >

Programming Rust. 2 ed - Jason Orendorff, Jim Blandy, Leonora F. S. Tindall

2021
english

 If you’re already a systems programmer and you’re ready for an alternative to C++, this book is for you. If you’re an experienced developer in any programming language, whether that’s C#, Java, Python, JavaScript, or something else, this book is for you too.

 However, you don’t just need to learn Rust. To get the most out of the language, you also need to gain some experience with systems programming. We recommend reading this book while also implementing some systems programming side projects in Rust. Build something you’ve never built before, something that takes advantage of Rust’s speed, concurrency, and safety. The list of topics at the beginning of this preface should give you some ideas.

Перейти >

Rust for Rustaceans - Jon Gjengset

2021
english

 In any language, the gap between what the introductory material teaches you and what you know after years of hands-on experience is always wide. Over time, you build familiarity with idioms, develop better mental models for core concepts, learn which designs and patterns work and which do not, and discover useful libraries and tools in the surrounding ecosystem. Taken together, this experience enables you to write better code in less time.

 With this book, I’m hoping to distill years of my own experience writing Rust code into a single, easy-to-digest resource. Rust for Rustaceans picks up where The Rust Programming Language (“the Rust book”) leaves off, though it’s well suited to any Rust programmer that wants to go beyond the basics, wherever you learned the trade. This book delves deeper into concepts such as unsafe code, the trait system, no_std code, and macros. It also covers new areas like asynchronous I/O, testing, embedded development, and ergonomic API design. I aim to explain and demystify these more advanced and powerful features of Rust and to enable you to build faster, more ergonomic, and more robust applications going forward.

 Канал автора на youtube, аккаунт на github.

Перейти >
< 1 2 >