My Account Log in

2 options

Rust for Blockchain Application Development : Learn to Build Decentralized Applications on Popular Blockchain Technologies Using Rust / Akhil Sharma.

EBSCOhost Academic eBook Collection (North America) Available online

View online

O'Reilly Online Learning: Academic/Public Library Edition Available online

View online
Format:
Book
Author/Creator:
Sharma, Akhil, 1971- author.
Language:
English
Subjects (All):
Rust (Computer program language).
Blockchains (Databases).
Physical Description:
1 online resource (392 pages)
Edition:
First edition.
Place of Publication:
Birmingham, England : Packt Publishing, [2024]
Biography/History:
Sharma Akhil: Akhil Sharma is a Software Engineer and an entrepreneur. He is the CTO of Dominate, a SaaS product company, and the founder of Myrl Tech, a tech services company providing technology consulting to some of the top enterprise companies in the world such as HP, 3M, Honda, Bose, and Adobe. He has 12+ years of industry experience and a solid understanding of building digital products. He is adept at multiple programming languages such as Golang, Rust, Ruby, Python, and JavaScript. He has mentored hundreds of engineers offline and discovered that they knew the programming language and the concepts around it but were unable to use them in real-world applications. He aims to close this gap by teaching how to apply the concepts practically and build projects in real time.
Summary:
Save time, improve stability, and optimize program memory while building decentralized applications on a blockchain using the features and capabilities of Rust Key Features Implement peer-to-peer blockchain using features of the Rust programming language Use Rust to build dApps on popular blockchains like Ethereum, Solana, and NEAR Optimize Rust code and enhance security updates to deploy a blockchain to production Purchase of the print or Kindle book includes a free PDF eBook Book Description Before Rust, blockchain developers didn't have a systems programming language that was type-safe, fast, and, at the same time, had stable and easy memory management. Rust proved to be a boon for developers and works as the perfect solution for not only blockchain and protocol development but also dApp development. Rust for Blockchain Application Development focuses on demonstrating solutions that can help blockchain developers productize decentralized applications using Rust, which is a complex language with a steep learning curve. This book starts with basic Rust language concepts and then builds on these concepts to enable you to develop your own blockchain from scratch. As you progress, you'll learn how to build dApps on popular chains like Solana and NEAR. You'll also be guided through creating Ethereum dApps using Foundry (Rust). Finally, you'll develop a custom blockchain using Substrate by Parity (Polkadot). The book provides a complete 360-degree view of Rust in the blockchain ecosystem. By the end of this Rust book, you'll have a thorough understanding of how to apply your Rust knowledge to building dApps and blockchains from scratch. What you will learn Understand essential Rust concepts required to build blockchain Apply blockchain features such as nodes and p2 communication using Rust Understand and implement consensus in blockchain Build and deploy a dApp on Ethereum with the Foundry framework in Rust Develop and deploy a dApp on Solana and the NEAR protocol Build a custom blockchain using the Substrate framework by Polkadot Who this book is for This Rust programming book is for blockchain developers interested in building dApps on popular blockchains using Rust. Blockchain architects wanting to save time required to go through documentation and understand each technology can also use this book as a quick-start guide. Experience in building applications on blockchain is required, and familiarity with Rust will be helpful but not necessary.
Contents:
Cover
Title Page
Copyright and Credits
Dedicated
Contributors
Table of Contents
Preface
Part 1: Blockchains and Rust
Chapter 1: Blockchains with Rust
Laying the foundation with the building blocks of blockchains
Blocks
Hashes
Transactions
Security
Storage versus compute
Exploring the backbone of blockchains
Decentralization
Peers, nodes, validators, and collators
Consensus
Mining
Forking
Permissioned versus permissionless
Understanding decentralization
Replication
Governance
Cryptocurrencies and gas fees
Decentralized platforms
Tokens versus coins and ICOs
Smart contracts and NFTs
DAOs
Non-censorable apps
Digital assets with real-world limits
Scaling the blockchain
The blockchain trilemma
Sharding
Interoperability
Consensus for scale
Parallel processing
Layer 2s and side chains
ZK rollups and optimistic rollups
Introducing smart contracts
The future of the adoption of blockchains
Industries disrupted
Sociocultural and economic changes
Summary
Chapter 2: Rust - Necessary Concepts for Building Blockchains
Introducing Rust
The benefit of being statically typed
A dive into Rust's applicability as a systems programming language
The reliability of Rust
The Rust ownership memory management model
Garbage collection
Speed and performance
Futures, error handling, and memory safety
Rust's advantage for blockchains
Blockchains that use Rust
Foundry for Ethereum
The Fe, Move, and ink! languages
Interesting blockchain projects built with Rust
Advantages of Rust-based languages compared to Solidity
Learning basic Rust concepts
Variables and constants
Data types
Tuples and arrays
Numeric operations
Stack
Heap
V-tables
Slices
Strings
Enums.
Exploring intermediate Rust concepts
Control flow
While loops
Functions
Match control flow
Structs
Vectors
Delving deep into advanced Rust concepts
Hashmaps
Ownership and borrowing
Crates, modules, and cargo
Part 2: Building the Blockchain
Chapter 3: Building a Custom Blockchain
Technical requirements
Windows installation
Mac installation
Ubuntu installation
VS Code
rust-analyzer
Cargo
Planning our first blockchain project
Required functions
Getting started with building the blockchain
Block
Creating the genesis block
Using helper functions
Exploring embedded databases
Chapter 4: Adding More Features to Our Custom Blockchain
Connecting the blocks
Libraries powering blockchain operations
Blockchain functions
Starting the node server
The server
Server struct and implemented methods
Enums
Helper functions
The serve function
The Node struct
Chapter 5: Finishing Up Our Custom Blockchain
Adding memory pools
Implementing a memory pool
The BlockinTransit implementation
Implementing transactions
Understanding TXInput transactions
Understanding TXOutput transactions
Understanding the Transaction implementation
Utilizing UTXOs and developing wallets
Implementing UTXOSet
Implementing wallets
Wallets
Setting up configurations and utilities
The Config implementation
Utility functions
Understanding the lib.rs file
Understanding the Main.rs file
Using your custom blockchain
Creating a new blockchain
Creating a new wallet
Checking the wallet balance
Starting a node
Sending currency
Listing all wallet addresses
Printing the blockchain
Rebuilding the UTXO set
Summary.
Part 3: Building Apps
Chapter 6: Using Foundry to Build on Ethereum
Introducing Ethereum and Foundry
Understanding Ethereum
Why Rust and Foundry?
Installing Foundry
First steps with Foundry
Exploring Foundry
Working on an existing Foundry project
Dependencies
Project layout
Overview of Forge
Forge Standard Library overview
Forge commands
Understanding Foundry with Cast, Anvil, and Chisel
Overview of Cast
Overview of Anvil
Overview of Chisel
Cast, Anvil, and Chisel important commands
Testing and deployment
Writing tests
Fork and fuzz testing
Invariant and differential testing
Deployment and verification
Gas reports and snapshots
A project using Foundry
Getting started
A basic NFT
Testing the program
Gas reports
Chapter 7: Exploring Solana by Building a dApp
Introducing dApps
What are dApps?
Types of dApps
Benefits of dApps
Setting up the environment for Solana
Installing Rust
Introducing Solana
Why Solana?
Generating a local key pair
Working with Solana frameworks and tools
Introducing Anchor
Creating a new Anchor project
Building and deploying a dApp
Building and deploying with Anchor
Running a local ledger
Updating the program ID
Utilizing Anchor scripts
Testing your dApp
Creating accounts for our custom dApp
Defining accounts for our custom dApp
Implementation of message account structure
Understanding account sizing and rent in Solana
Sizing message accounts
Implementation in code
Creating our first instruction
Introduction to instruction creation
Establishing account constraints
Implementing logic
Safeguarding against invalid data
Instruction versus transaction
Creating tests for our instructions
Creating a client for tests
Sending a message.
Summary
Chapter 8: Exploring NEAR by Building a dApp
Prerequisites
Installation
Introducing NEAR
Why choose NEAR?
Understanding the foundational elements of NEAR
Learning about the advanced concepts of NEAR
Transactions and gas
Data flow
Tokens and avoiding loss
Storage options
Validators and consensus
NEAR SDK
Getting started with the NEAR blockchain
The Contract class
State and data structures
Transfers and actions
Cross contract calls
NEAR CLI deep dive
Creating our first project with NEAR
Understanding the structure and rules of the crossword game
Setting up the development environment
Creating a smart contract skeleton
Interacting with the contract
Part 4: Polkadot and Substrate
Chapter 9: Exploring Polkadot, Kusama, and Substrate
Introducing Polkadot
Relay chain
Parathreads
Bridges
Accounts
Tokens and assets
NFTs
Understanding the core concepts of PolkaDot
XCM
Shared security
Pallets
Staking
Advanced staking concepts
Main actors
NPoS election algorithms
Learning about Kusama
Governance and on-chain upgrades
Chaos and experimentation
Introducing Substrate
Substrate architecture
Client and runtime
Network types
Node types
Diving deep into Substrate
Runtime interfaces
Core primitives
FRAME
Building custom pallets
Forkless and runtime upgrades
Chapter 10: Hands-On with Substrate
Installing Substrate
Building our own blockchain
Starting a local node
Installing a frontend template
Starting the frontend template
Transferring the funds
Simulating a network
Starting the first blockchain node
Adding more nodes.
Verifying block production
Part 5: The Future of Blockchains
Chapter 11: Future of Rust for Blockchains
What the future looks like for Rust blockchains
Popular blockchains
Upcoming blockchains
Upcoming Rust Web3 projects
The Rust community
Jobs in the Web3 space
Popular job roles
How to find Web3 jobs
Building a career
Going beyond this book
Index
Other Books You May Enjoy.
Notes:
Includes index.
Description based on publisher supplied metadata and other sources.
Description based on print version record.
ISBN:
9781837630059
1837630054
OCLC:
1429724041

The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.

Find

Home Release notes

My Account

Shelf Request an item Bookmarks Fines and fees Settings

Guides

Using the Find catalog Using Articles+ Using your account