9 Rust Best Practices with Real Lib (part 1/3) @JeremyChone
9 Rust Best Practices with Real Lib (part 1/3)  @JeremyChone
Uploaded July 2024 | Updated November 2026, 3 hours ago
Here are 9 Rust Programming best practices I am using when building a library. We will use a real library, genai, as an example.

GitHub (at v0.1.5, this video code version): github.com/jeremychone/rust-genai/tree/v0.1.5

Part 1 (this one): youtube.com/watch?v=XCrZleaIUO4&list=PL7r-PXl6ZPcCIOFaL7nVHXZvBmHNhrh_Q
Part 2: youtube.com/watch?v=LRfDAZfo00o&list=PL7r-PXl6ZPcCIOFaL7nVHXZvBmHNhrh_Q
Part 3: youtube.com/watch?v=93SS3VGsKx4&list=PL7r-PXl6ZPcCIOFaL7nVHXZvBmHNhrh_Q

This is part of a 3-part series, and in this episode, we will focus on the following Rust Programming best practices,

1) Module Structure - Rust Nampespacing, Scoping and code orgnaization
2) Rust Error Handling practices
3) Rust Constructors, chainable setters, and builder patterns and best practices.

- 00:00 - Intro
- 00:10 - c01: Module Structure
- 06:14 - c02: Error Handling
- 11:57 - c03: (a) Constructors, Builders, Setters
- 22:45 - c03: (b) Constructors/builders Code example

== Jeremy Chone:

- Discord general-rust - discord.gg/W2besKCzjx
- Discord rust10x - discord.gg/XuKWrNGKpC
- Patreon - patreon.com/jeremychone - Any help is a big help (for Rust educational content)
- Twitter - twitter.com/jeremychone

britesnow.com - BriteSnow is my enterprise consulting company I have been running for 15 years. We help enterprises build and modernize next-gen applications. Feel free to send an email to jeremy.chone@britensow.com if you have any questions.


Big thanks to CrabNebula (https://crabnebula.dev/) for sponsoring this channel.

== Jeremy Chone Rust Video Playlists:

- Rust AI Programming Series: youtube.com/playlist?list=PL7r-PXl6ZPcBcLsBdBABOFUuLziNyigqj
- Rust Web App Production Coding Series: youtube.com/playlist?list=PL7r-PXl6ZPcCTTxjmsb9bFZB9i01fAtI7
- Rust For Desktop App: youtube.com/playlist?list=PL7r-PXl6ZPcAQAi1lfVrtHCSbaJbwZ4O8
- Everything Rust Programming - Tutorials, Courses, Tips, Examples: youtube.com/playlist?list=PL7r-PXl6ZPcCIOFaL7nVHXZvBmHNhrh_Q
- Rust Programming for Web Development: youtube.com/playlist?list=PL7r-PXl6ZPcCLvwpdD2Vj1O4CyoFTiHKd
- Rust Courses: youtube.com/playlist?list=PL7r-PXl6ZPcB4jn1_VR3D8tSK9DxOaiQE
- Rust for Java Developers: youtube.com/playlist?list=PL7r-PXl6ZPcD63DS2djSiz4SlXkaTfobc
9 Rust Best Practices with Real Lib (part 1/3)Rust Axum Full Course - Web Development (GitHub repo updated to Axum 0.7)Rust Cross Compile - 1 Machine → 6 Targets (Linux/Mac/Windows Arm & x86)Rust Bevy Tutorial 1/3 - GameDev from Scratch!!!AI Production Coding - Pro/Coder AI Pack DemoLive Coding ➜ MCP Streamable Transport · Part 2RUSTFS - New AWS S3 Compatible Object Storage (from Minio)Rust Programming: The Ultimate Builder Pattern TutorialRust for Java Developers 2/3 - Java 17 side by sideRust Tip - Into String as Function ArgumentsRust Lang Tutorial - if, else, for loopsRust Channels - Patterns and Best Practices
Jeremy Chone |

9 Rust Best Practices with Real Lib (part 1/3)

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER