Loading video player...
Thank you to Tailscale for sponsoring the streams! https://link.bashbunni.dev/tailscale In this stream, bashbunni dives into the world of systems programming by building a custom shell (REPL) using Rust. From handling user input and implementing built-in commands like echo and exit to exploring pattern matching and error handling, this is a deep dive into practical Rust development. Whether you're a Rust beginner or just love watching raw, unedited coding sessions, follow along as I navigate the challenges of building a CLI tool from the ground up using the CodeCrafters platform. Show your support for bunni by using her referral link https://link.bashbunni.dev/codecrafters This also gets you 40% off of their annual plan (ignore the 72 hour window, you can redeem this discount indefinitely) --- ⟡˖ Watch Live I live stream the entire process of learning Rust and building these projects every Monday, Wednesday, and Thursday at 12pm PT. Subscribe to follow along with the journey! ⟡˖ How to support bunni Join this channel to get access to perks: https://www.youtube.com/channel/UC9H0HzpKf5JlazkADWnW1Jw/join bashbunni is partnered with Tailscale! Tailscale leverages the Wireguard protocol to create a user friendly, low latency, peer-to-peer mesh network. It's free for individuals + get three months free off of any paid plan with code 'bashbunni'. https://link.bashbunni.dev/tailscale ⟡˖ My other corners of the Internet: https://twitch.tv/bashbunni https://github.com/bashbunni https://discord.com/invite/Y3vbKS4K9j (come hang!) https://matrix.to/#/#bashbunni:matrix.org https://mastodon.social/@bashbunni https://twitter.com/sudobunni https://bsky.app/profile/bashbunni.dev Chapters: 00:00 - Overcoming technical difficulties & stream setup 02:20 - The project goal: Building a shell in Rust 03:45 - Assessing prerequisites & setting up the repo 06:40 - First stage: Initializing the CodeCrafters CLI 08:50 - Implementing basic command output 13:30 - Understanding buffers and flushing standard out 16:15 - Stage 2: Handling invalid commands & pattern matching 19:10 - Working with strings and user input in Rust 23:50 - Trimming whitespace & refining command parsing 30:55 - Stage 3: Implementing the REPL (Interactive Loop) 34:50 - Discussion: Why struggle through code without AI? 40:15 - Handling Control+C and process termination 43:00 - Reflecting on lessons learned so far 45:45 - Stage 4: Adding the 'exit' built-in command 52:40 - Solving the logic for terminating the shell loop 1:04:10 - Discussion: Backend vs. Game Dev & project ideas 1:13:45 - The philosophy of learning through failure 1:16:45 - Stage 5: Building the 'echo' command 1:24:30 - Working with Iterators: Next, Take, and Collect 1:36:40 - Refining 'echo' with split_once and unwrap_or_else 1:50:10 - Rust vs. Go: Which should you learn first? 2:13:20 - Stage 6: Implementing the 'type' built-in command 2:34:00 - Structuring commands with Enums and the strum crate 2:54:00 - Debugging Rust macros & crate dependencies 3:08:40 - Integrating from_string for command validation 3:28:00 - Reviewing community solutions & code organization 3:48:50 - Planning the next steps & stream wrap-up