ENGLISH

Rust Cookbook

Book information

Publisher
Packt Publishing
Year
2017
ISBN
9781785880254, 178588025X, 9781785886218, 1785886215
Language
english
Format
PDF
Filesize
5 MB (5115728 bytes)
Pages
314 pages\314
Time added
2020-07-26 19:24:52

Description

Cover; Copyright; Credits; About the Author; Acknowledgments; About the Reviewer; www.PacktPub.com; Customer Feedback; Table of Contents; Preface; Chapter 1: Let us Make System Programming Great Again; Introduction; Setting up Rust in Linux and macOS; Getting ready; How to do it ... ; Uninstalling Rust; Rust's compiler version; Advanced installation options; Troubleshooting; How it works ... ; Setting up Rust in Windows; Getting ready; How to do it ... ; How it works ... ; Creating your first Rust program; Getting ready; How to do it ... ; How it works ... ; Defining a variable assignment; Getting ready.;75-80 recipes for learning Rust programmingAbout This Book* Learn to build high-performance Rust units and integrate them into your existing application* Work through recipes on performance, robustness, security, memory management, and scalability* Work through recipes to build foreign function interface with C, JS, and PythonWho This Book Is ForIf you want to write Rust programs, then this book is for you. This book is for those who have a basic knowledge of Rust or any programming language. If you are a C/C developer who is migrating to Rust for various reasons, this book is ideal for you. What You Will Learn* Understand system programming language problems and see how Rust provides unique solutions* Get to know the core concepts of Rust to develop fast and safe applications* Explore the possibility of integrating Rust units into existing applications to make them more efficient* Achieve better parallelism, security, and performance* Explore ways to package your Rust application and ship it for deployment in a production environment* Discover how to build web applications and services using Rust to provide high-performance to the end userIn DetailIf you are building concurrent applications, server-side programs, or high-performance applications, you will benefit from this language. This book comes with a lot of application-specific recipes to kick-start your development of real-world high-performance applications with the Rust programming language and integrating Rust units into your existing applications. In this book, you will find some 80 practical recipes written in Rust that will allow you to use the code samples right away in your existing applications. These recipes have been tested with stable rust compiler versions of 1.14.0 and above. This book will help you understand the core concepts of the Rust language, enabling you to develop efficient and high-performance applications by incorporating features such as zero cost abstraction and better memory management. We'll delve into advanced-level concepts such as error handling, macros, crates, and parallelism in Rust. Toward the end of the book, you will learn how to create HTTP servers and web services, building a strong foundational knowledge in server-side programming and enabling you to deliver solutions to build high-performance and safer production-level web applications and services using Rust. Style and approachThis book helps you learn the core concepts of Rust faster by taking a recipe-based approach, where you can try out different code snippets to understand a concept. Cover Copyright Credits About the Author Acknowledgments About the Reviewer www.PacktPub.com Customer Feedback Table of Contents Preface Chapter 1: Let us Make System Programming Great Again Introduction Setting up Rust in Linux and macOS Getting ready How to do it ... Uninstalling Rust Rust's compiler version Advanced installation options Troubleshooting How it works ... Setting up Rust in Windows Getting ready How to do it ... How it works ... Creating your first Rust program Getting ready How to do it ... How it works ... Defining a variable assignment Getting ready. How to do it ... How it works ... Setting up Boolean and the character types Getting ready How to do it ... How it works ... Controlling decimal points, number formats, and named arguments Getting ready How to do it ... How it works ... Performing arithmetic operations Getting ready How to do it ... How it works ... Defining mutable variables Getting ready How to do it ... How it works ... Declaring and performing string operations Getting ready How to do it ... How it works ... Declaring arrays and using slices in Rust Getting ready How to do it ... How it works ... Declaring vectors in RustGetting ready How to do it ... How it works ... Declaring tuples in Rust Getting ready How to do it ... How it works ... Performing calculations on two numbers Getting ready How to do it ... How it works ... Chapter 2: Advanced Programming with Rust Introduction Defining an expression Getting ready How to do it ... How it works ... Defining constants Getting ready How to do it ... How it works ... Performing variable bindings Getting ready How to do it ... How it works ... Performing type casting in Rust Getting ready How to do it ... How it works ... Decision-making with RustGetting ready How to do it ... How it works ... Looping operations in Rust Getting ready How to do it ... How it works ... Defining the enum type Getting ready How to do it ... How it works ... Defining closures Getting ready How to do it ... How it works ... Performing pointer operations in Rust Getting ready How to do it ... How it works ... Defining your first user-defined data type Getting ready How to do it ... How it works ... Adding functionality to the user-defined data type Getting ready How to do it ... How it works ... Similar functionality for different data typeGetting ready How to do it ... How it works ... Chapter 3: Deep Diving into Cargo Introduction Creating a new project using Cargo Getting ready How to do it ... How it works ... Downloading an external crate from crates.io Getting ready How to do it ... How it works ... Working on existing Cargo projects Getting ready How to do it ... How it works ... Running tests with Cargo Getting ready How to do it ... How it works ... Configuration management of the project Getting ready How to do it ... How it works ...

Similar books

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

2010 · PDF

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

1858 · PDF

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

2022 · PDF

The travels of Capts. Lewis and Clarke from St. Louis, by way of the Missouri and Columbia rivers, to the Pacific ocean; performed in the years 1804, 1805 & 1806, by order of the government of the United States. Containing delineations of the manners, customs, religion, &c. of the Indians, comp. from various authentic sources, and original documents, and a summary of the Statistical view of the Indian nations, from the official communication of Meriwether Lewis. Illustrated with a map of the country, inhabited by the western tribes of Indians

The travels of Capts. Lewis and Clarke from St. Louis, by way of the Missouri and Columbia rivers, to the Pacific ocean; performed in the years 1804, 1805 & 1806, by order of the government of the United States. Containing delineations of the manners, customs, religion, &c. of the Indians, comp. from various authentic sources, and original documents, and a summary of the Statistical view of the Indian nations, from the official communication of Meriwether Lewis. Illustrated with a map of the country, inhabited by the western tribes of Indians

1809 · PDF