Rust For Web3 and Solana Development Encyclopedia 🌐 (WIP)
📚 Rust Web3 Solana
Welcome to the Rust Web3 Solana repository! This collection of Jupyter notebooks provides an extensive tutorial on using Rust for Solana development. I have compiled these resources while preparing for a senior blockchain & solana developer role interviews, aiming to create a hands-on tutorial for utilizing Rust in Solana development through Jupyter notebooks. This repository houses a wide range of topics covering web3 in general and Solana in particular.
📝 Table of Contents
🚀 Installation
To use the notebooks in this repository, you need to set up your environment. Follow these steps to get started:
- Clone the repository to your local machine:
git clone https://github.com/wiseaidev/rust-web3-solana.git
- Install the required dependencies and libraries. Make sure you have
Rust,Jupyter Notebook, andevcxr_jupyterinstalled on your system.
# Install a Rust toolchain (e.g., nightly):
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
# Install Jupyter Notebook pip install notebook
# Install evcxr_jupyter cargo install evcxr_jupyter evcxr_jupyter --install
- Navigate to the cloned repository:
cd rust-web3-solana
- Start Jupyter Notebook:
jupyter notebook
- Access the notebooks in your web browser by clicking on the notebook file you want to explore.
📌 Chapters
| ID | Title | NB Pages | Topics | Open on GitHub | Launch on Binder | Launch on Colab | Read PDF | |----|---------------|-----------|:-------------|-------------|----------------|-------|-------| | 1 | Web3 Solana Basics | 21+ | - Cryptographic Key Pairs
- Digital Wallets
- Solana Accounts
- Smart Contracts
- Instructions and Transactions
- The Architecture of the Solana Blockchain
- Communicating with Solana through JSON RPC
- Proof of History (POH) | |
|
|
| | 2 | Chapter 2: Deep Dive into OpenBook V1 on Solana | 10+ | - Central Limit Order Book (CLOB)
- OpenBook V1 Accounts
- Market Bids/Asks
- Market Event/Request Queues
- Placing Orders
- Open Orders Account
- Slab
- Order ID
- OpenBook Crate | |
|
|
| | 3 | Chapter 3: Order Lifecycle on the OpenBook v1 Dex | 9+ | - Event Queues
- Order Matching Engine
- Order Placement and Cancellation
- Order Execution and Settlement
- Fee Calculation and Distribution | |
|
|
| | 4 | Chapter 4: Understanding the Critbit Process in OpenBook v1 | 10+ | - Crit-Bit Trees
- InnerNode Structure Operations
- LeafNode Structure Operations
- FreeNode Structure and Operations
- Other Critbit Operations | |
|
|
| | 5 | Chapter 5: Deep Dive into OpenBook V2 Program | 19 | - OpenBook V2 Intro
- OpenBook V2 Core Components
- OpenBook V2 Central Limit Orderbook (CLOB)
- Order Matching and Execution
- Events Iteration and Processing
- Orders Tree Operations | |
|
|
|
🤝 Contributing
We welcome contributions to enhance the Rust Web3 Solana repository! To contribute, please follow the CONTRIBUTING.md file guidelines. Thank you for helping make this project better!
📜 License
This project is licensed under the MIT. For more details, You can refer to the LICENSE file.