Repository navigation
rust_std: an interactive course in standard Rust, with zero dependencies - #1
Merged
Merged
Conversation
A lib+bin crate with zero dependencies: lessons are static data whose code samples are real functions cut out of the lesson's own source by anchor, displayed with a small highlighter and executed live. Includes a CLI with an interactive menu, quizzes, search and file-based progress, plus tests that compile every prose example and check compile_fail blocks fail as claimed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UkYbwHpY9bywefAyqBSch7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UkYbwHpY9bywefAyqBSch7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UkYbwHpY9bywefAyqBSch7
…rators Also guard the lesson registry with tests: every lesson file must be registered and every code region must be shown by a section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UkYbwHpY9bywefAyqBSch7
…omics, I/O, std tour Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UkYbwHpY9bywefAyqBSch7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UkYbwHpY9bywefAyqBSch7
Bytes and bits, CAN frame parsing (text, SocketCAN layout, Intel/Motorola signals, OBD-II, fuzzing), allocation-free containers measured with a counting global allocator, typestate, panic freedom, unsafe and FFI against real libc functions, core/alloc/std layering, vehicle concurrency patterns, and safety-critical context with plausibility, voting and E2E protection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UkYbwHpY9bywefAyqBSch7
- Interview clinic: model answers, predict-the-output drills, and whiteboard classics (two-stack queue, linked list, O(1) LRU, array and string problems). - Capstone: a multi-threaded CAN signal gateway built from earlier lessons' parts, behind a typestate API, with fuzz and allocation checks. - Quiz choices are now shuffled at display time; most answers were 'b'. - List view aligns to the longest title. - rust-version set to 1.95 (verified: cfg_select! needs it; the full suite passes on 1.95 and 1.97). - README with commands, generated curriculum, study paths and layout. - GitHub Actions: fmt + clippy, and tests on Linux/macOS/Windows for stable and 1.95. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UkYbwHpY9bywefAyqBSch7
Teach as_chunks::<N>() instead of chunks_exact with a constant size, mark the deferred-initialization demo as intentional, and move CI to actions/checkout@v5 (Node 20 deprecation). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UkYbwHpY9bywefAyqBSch7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A command-line course that teaches Rust using only the standard library. The crate has no dependencies. It has 41 lessons in eight parts, 315 live demos, 208 quiz questions, and exercises at the end of every lesson.
Curriculum
repr, enums, every pattern form (let chains, let-else), Option/Result, error handling.dyn, the standard traits and operators, closures, iterators.macro_rules!, testing, advanced types (DSTs, niches, Pin, GATs), and async from scratch with a hand-rolled executor.core/alloc/std, vehicle concurrency patterns, and safety-critical context (ISO 26262, E2E protection, 2-of-3 voting).How it works
staticdata. Each code sample is a real function in the lesson's own file. The CLI cuts it out by// ANCHOR:markers, highlights it, and runs it, so shown code and output can't drift apart.Verification
tests/prose_examples.rscompiles everyrustblock in the lesson text. It also checks that each of the 26compile_failblocks fails with the error code it claims (E0382, E0499, E0502, E0597, …).tests/cli.rsrenders every lesson through the real binary and drives the interactive menu, quiz and progress file.-D warnings), plus tests on Linux, macOS and Windows for stable and Rust 1.95. That pins the declaredrust-version; 1.94 lackscfg_select!.Notes
mainholds a single empty "Initial commit", because the repository started empty and a PR needs a base branch.Cargo.tomlsetspublish = false. The license is the owner's choice.🤖 Generated with Claude Code
https://claude.ai/code/session_01UkYbwHpY9bywefAyqBSch7
Generated by Claude Code