跳到正文
Hacker News· grajo·· 7 天前AI 评分38

rustcoach:用 rustc 逐题批改的 Rust 免费测验

Show HN: How good is your Rust? Free quiz, every code answer checked by rustc

AI 导读

rustcoach 上线免费 Rust 测验,每道代码答案都由 rustc 实际编译运行并跑 clippy 检查。它基于 Claude 构建,会记录你此前答错的内容并在新课前重测,复习卡片按 1、3、7、14、30、60 天间隔回归,完整课程一次性收费 $49。

正文 · 原文

rustcoach Test your Rust Why not a chatbot Modules How it works Pricing FAQ Sign in Start learning

Your AI chatexplains Rust.rustcoach makes you write it.

A coach that remembers what you got wrong, runs your code against real tests, reviews it like a pull request and won’t hand you the answer. Built for developers coming from Python, JavaScript or Java; complete beginners are welcome too. $49 once.

Why not just ask an AI chatbot?

You can, and it will explain Rust well. rustcoach is built on Claude too. What a chat window can’t do is everything around the explanation.

An AI chatrustcoach

Doesn’t track what you got wrong three lessons ago.Keeps notes on you and re-tests what you got wrong last time before teaching anything new.

Reads your code. Nothing holds it to a test suite.Compiles it, runs the tests and runs clippy in a sandbox.

Writes the fix the moment you ask for it.Points you at the API and traces your code line by line. The fix stays yours.

Waits for you to know what to ask.Every module's chapters in order, and nothing is signed off until it sticks.

Won’t bring a topic back just before you forget it.Brings review cards back at 1, 3, 7, 14, 30 and 60 days.

A real session, not a mockup

Recorded in a real lesson: the tests pass, and the review still finds a needless return and a skipped instruction. Every screen is the app as it runs.

Plays from YouTube (youtube-nocookie.com) only when you click. More: the five steps · the small tools.

From reading Rust to writing it.Five steps, all with a coach beside you.

01

A lesson written for you, not a template

There is no lesson 7 that everyone gets. The coach reads its notes on you, re-tests what you got wrong last time, then teaches one idea with examples you can run, checking every few explanations that it landed.

Coach

Length in bytes of the first word, or None if there is none. You reached for indexing last time; try a combinator.

rust

fn first_word_len(text: &str) -> Option<usize> {
    text.split_whitespace().next().map(str::len)
}

run_tests

  • first_word
  • empty_string
  • leading_spaces

Review: no unwrap, one combinator chain. Signed off.3 passed

02

Ask the moment you are lost

Stop the lesson mid-sentence: “wait, why &str and not String?” The coach answers in the context of the code on screen, then picks up where you left off. No question is too small, and any topic you have covered is one click away.

Coach

So first_word takes a string and hands back a slice of it, without copying a single byte…

Wait, why &str and not String? I thought strings were String.

Coach

String owns its bytes; &str only borrows them. Taking &str means the function accepts a String (as &s) and a literal like "hi" alike, and never takes your string away from you.

Back to where we were: the slice we return points into the caller's string, so…

03

You write every line

Every lesson ends with an assignment you write yourself in the browser editor, and the tests decide when it is done. Stuck? Hints point at the API to reach for, and the trace steps through your function line by line. Never the answer.

src/lib.rs·17 lines Trace onHints on

7pub fn initials(name: &str) -> Option<String> { 8 let mut words = name.split_whitespace(); 9 let first = words.next()?; first ="ada"words =SplitWhitespace { … }name ="ada lovelace" 10 let last = words.last()?; 11 let a = first.chars().next()?; 12 let b = last.chars().next()?;

initialstest initials_ok · step 3 of 10Next

04

Reviewed like a pull request

Passing tests is where review starts. The coach reads the code you actually wrote and holds it to how Rust is written professionally: no stray unwrap, combinators over nested match, clippy clean, cargo fmt applied. You fix it until it is signed off.

Review · parse_pair

All three tests pass. Two things before I sign it off:

  1. line 11.unwrap() on the first character panics on an empty word. The function already returns Option: use ?.
  2. lines 9–14Two nested match on Option read as one step: first.zip(last).
  3. clippyneedless_return on line 15. The last expression is the return value.

Fix, run the tests, resubmit.Changes requested

05

Nothing is marked done until it sticks

Mastery rises with right answers and falls with wrong ones. Shaky topics come back as a redo, and review cards return at 1, 3, 7, 14, 30 and 60 days. The coach keeps notes on what stuck, so the next lesson starts from there.

Ownership and move semantics

Taught the single-owner model and moves on assignment. Answered all three check questions; needed one correction on Copy vs Drop.

Copy vs Clone

Derives Copy on his own types now. clone_from still untaught.

References and borrowing rules

Passed all 9 tests first try. Re-test that he picks &mut [T] when the length is unchanged.

Slices (&str, &[T])

Built around the ways people actually get stuck.

Small tools, each one for a moment where you would otherwise be on your own.

Quick check

Which line moves s instead of borrowing it?

Alet t = &s; Blet t = s; Clet n = s.len();

Right.

Assigning a String to a new binding moves it; &s and a method call only borrow.

Quick checks

Every few explanations the coach asks one question. Click, see why, and the lesson picks up from your answer.

Build failed Explain with the coach

  • E0382borrow of moved value: wordsline 9

    WHATLine 8 handed words to next() by value, so by line 9 there is nothing left to borrow.

    TRYLook at what an iterator's next takes: &mut self. The binding needs to allow that.

Compiler error coach

A failed build lists each rustc error and tints the line. One click explains, in plain English, what went wrong and what to try next. The fix stays yours.

src/lib.rs·21 lines3 clippy notes

14 let unused = 1; 15 if out.len() == 0 { return None; } 16 return Some(out); 17}

clippy · len_zero

length comparison to zero

  • using is_empty is clearer and more explicit

About len_zero

Clippy as an additional teacher

Every test run also runs clippy. Each lint is a broom in the gutter with the message, the help and a link, and the review teaches the idiom behind one.

Review3 of 8·Chapter 2 · Copy vs Clone

What does this print?

let a = String::from("hi");
let b = a.clone();
println!("{a} {b}");

Acompile error: a moved Bhi hi Chi then a panic

Right.

clone makes a second String, so both bindings are still usable.

Back in 7 days.Next

Review cards

When a lesson ends, the coach writes two cards per topic it signed off. They come back at 1, 3, 7, 14, 30 and 60 days. A miss brings one back tomorrow.

Stretch challenge

Accepted. Now make initials work without to_ascii_uppercase allocating twice: one String, built once.

StretchOptional.Skip it

Stretch challenges

Solution accepted? One optional refactor. Extra credit, never part of the sign-off.

src/lib.rsscratch.rs

1fn main() {2 let v = vec![3, 1, 2];3 println!("{:?}", v.iter().max());4}

RunRan

Some(3)

A scratch file

scratch.rs next to the assignment. cargo run in the same sandbox, nothing graded, saved between visits.

3let first = words.next()?;4let last = words.last()?;

Explain⌘⇧E

Coach

? on an Option returns None from the whole function, so these two lines are also the "fewer than two words" guard.

Explain this selection

Select code, press one shortcut, and the coach explains it in the lesson.

7days in a row

Chapter 2

Ownership and borrowing

Mastery 85%

Chapter 2 complete.

Streaks and mastery

A day counts when you chat, run tests or answer a card. Mastery rises with sign-offs and right answers, and falls with wrong ones.

Five modules. Start with any of them.

Core Rust takes you through the whole language. The four deep dives each go far further into one subject, and each starts with the foundations it needs, so you can begin with the one you care about. Progress, lessons and review cards are kept separately for every module.

    1. Where Rust starts to feel different: almost everything is an expression, and the compiler holds you to it. Bindings, mutability and shadowing, the primitive types, and every control-flow form, match included, before ownership enters the picture.

      1. 01Variables, mutability and shadowing
      2. 02Primitive types and literals
      3. 03Functions and expressions vs statements
      4. 04Control flow: if, loop, while, for, match basics
    2. The chapter that makes Rust Rust. Moves, Copy versus Clone, the borrowing rules the compiler enforces, and slices. The coach re-tests these until the borrow checker stops feeling like an opponent.

      1. 01Ownership and move semantics
      2. 02Copy vs Clone
      3. 03References and borrowing rules
      4. 04Slices (&str, &[T])
    3. How Rust wants you to model data: structs with methods, enums that make invalid states unrepresentable, and pattern matching the compiler checks for exhaustiveness. Option and Result appear here as ordinary enums, not magic.

      1. 01Structs and methods
      2. 02Enums and exhaustive pattern matching
      3. 03Option and Result basics
      4. 04Pattern syntax: destructuring, guards, bindings
    4. The three workhorse collections, Vec, String and HashMap, and the ownership questions each one raises. The String versus &str distinction in depth, and the entry API for maps.

      1. 01Vec and growable storage
      2. 02String vs &str in depth
      3. 03HashMap and entry API
    5. When to panic and when to return an error. You propagate failures with the ? operator, design custom error types, and use From so conversions happen for free. Zero unwraps, and the review checks.

      1. 01panic! vs recoverable errors
      2. 02The ? operator and error propagation
      3. 03Custom error types and From
    6. Code that is generic without being abstract for its own sake: trait bounds, where clauses, impl Trait, and what monomorphization means for the code the compiler actually emits. Ends with operator overloading through std::ops.

      1. 01Generics and monomorphization
      2. 02Traits, trait bounds, where clauses
      3. 03impl Trait and default methods
      4. 04Operator overloading via std::ops
    7. Lifetimes are Rust's most feared feature and mostly a notation problem. You learn what the annotations actually claim, when elision writes them for you, and what it takes for a struct to hold references.

      1. 01Lifetime annotations and elision
      2. 02Structs holding references
      3. 03'static and lifetime bounds
    8. Closures and the three capture modes behind Fn, FnMut and FnOnce, then the Iterator trait and its adapters. Why iterators are lazy, what collect really does, and when a for loop is still the right call.

      1. 01Closures and capture modes
      2. 02Fn / FnMut / FnOnce
      3. 03Iterator trait and adapters
      4. 04Laziness and collect
    9. What to reach for when plain ownership is not enough: Box, Rc and Arc for shared ownership, RefCell and Cell for interior mutability, plus Deref, Drop and Weak, and the runtime cost each one trades for flexibility.

      1. 01Box, Rc, Arc
      2. 02RefCell, Cell and interior mutability
      3. 03Deref, Drop, Weak
    10. How Rust code is organized in the large: modules and visibility, use paths, and crates, including workspaces and feature flags. The parts that only start to matter once projects grow.

      1. 01Modules, visibility and use
      2. 02Crates, workspaces and features
    11. Rust's three kinds of tests, unit, integration and doc tests, and where each belongs. A short chapter. The habit matters more than the API.

      1. 01Unit, integration and doc tests
    12. Fearless concurrency, backed by the type system: spawning threads, sharing state with Mutex, RwLock and atomics, passing messages over channels, and what Send and Sync actually promise.

      1. 01Threads and JoinHandle
      2. 02Mutex, RwLock, atomics
      3. 03Channels (mpsc)
      4. 04Send and Sync
    13. The trait system at full depth: trait objects and dynamic dispatch versus generics, associated types, higher-ranked trait bounds, and the newtype and typestate patterns that push invariants into types.

      1. 01Trait objects and dynamic dispatch
      2. 02Associated types and generic traits
      3. 03Higher-ranked trait bounds
      4. 04Newtype and typestate patterns
    14. What macro_rules! can do, how to read matcher syntax without fear, and a tour of procedural macros. Enough to understand what derive is doing on your behalf.

      1. 01Declarative macros (macro_rules!)
      2. 02Procedural macros overview
    15. The escape hatch and its rules: raw pointers, the invariants unsafe blocks promise to uphold, and calling C over FFI. Small, careful, and honest about what the compiler can no longer check.

      1. 01unsafe: raw pointers and invariants
      2. 02FFI and extern "C"
    16. Async from the ground up: what a Future is, what async/await desugars to, why Pin exists, and how Tokio schedules tasks. Spawn, select and the patterns real services use.

      1. 01async/await and Futures
      2. 02Pin and why it exists
      3. 03Tokio: tasks, spawn, select
    1. The Rust that async leans on: ownership, traits and generics, closures, smart pointers, and what Send and Sync promise. Fast if you know it, thorough if you don't.

      1. 01Ownership and move semantics
      2. 02References and borrowing rules
      3. 03Option and Result basics
      4. 04The ? operator and error propagation
      5. 05Generics and monomorphization
      6. 06Traits, trait bounds, where clauses
      7. 07impl Trait and default methods
      8. 08'static and lifetime bounds
      9. 09Closures and capture modes
      10. 10Fn / FnMut / FnOnce
      11. 11Box, Rc, Arc
      12. 12Mutex, RwLock, atomics
      13. 13Send and Sync
      14. 14Trait objects and dynamic dispatch
    2. What a Future is, how poll and wakers drive it, and what async fn compiles to. You write a future by hand and a tiny executor that runs it.

      1. 01The Future trait and Poll
      2. 02Waker and Context
      3. 03Writing a future by hand
      4. 04async fn as a state machine
      5. 05Building a minimal executor
    3. Why self-referential futures need Pin, what Unpin opts out of, and how to project pins safely when you write your own futures.

      1. 01Pin, Unpin and self-referential futures
      2. 02Pin projection
      3. 03Box::pin and dyn Future
    4. Runtime flavors, spawning tasks and the 'static + Send bounds they impose, blocking work, and running !Send futures on a LocalSet.

      1. 01current_thread vs multi_thread runtimes
      2. 02spawn, JoinHandle and the 'static + Send bounds
      3. 03spawn_blocking and blocking the runtime
      4. 04LocalSet and !Send futures
    5. join!, select! and JoinSet: running work concurrently, racing it, and what cancellation safety means when a branch loses.

      1. 01join! and try_join!
      2. 02select! and cancellation safety
      3. 03JoinSet and structured concurrency
      4. 04Timeouts and paused time
    6. When an async Mutex is right and when std's is, every Tokio channel and what it is for, and backpressure with semaphores.

      1. 01tokio Mutex vs std Mutex across .await
      2. 02mpsc and oneshot channels
      3. 03broadcast and watch channels
      4. 04Semaphore, Notify and backpressure
    7. Futures are cancelled by being dropped. Cancellation tokens, cleanup that still runs, and shutting a service down gracefully.

      1. 01Drop-based cancellation and CancellationToken
      2. 02Graceful shutdown
    8. Streams and their combinators, AsyncRead and AsyncWrite, framing a protocol with codecs, all tested over in-memory pipes.

      1. 01Stream and StreamExt
      2. 02AsyncRead, AsyncWrite and buffering
      3. 03Framing with tokio-util codecs
      4. 04In-memory duplex streams
    9. async fn in traits, where dyn stops working and why, and async closures.

      1. 01async fn in traits and dyn compatibility
      2. 02Async closures and AsyncFn
    10. Actors, bounded parallelism, retries with backoff and rate limiting: the shapes production async code keeps reaching for.

      1. 01The actor pattern
      2. 02Bounded parallelism with buffer_unordered
      3. 03Retry with backoff
      4. 04Rate limiting
    11. Deterministic tests with paused time, tracing spans that follow a request across tasks, and the classic async bugs.

      1. 01#[tokio::test] with deterministic time
      2. 02tracing in async code
      3. 03Async pitfalls: locks across await and Send errors
    12. An in-memory key-value server: protocol, framing, concurrent connections and graceful shutdown, built and tested over several lessons.

      1. 01Key-value server: protocol and framing
      2. 02Key-value server: connections, shutdown and tests
    1. The Rust macros generate and parse: enums and patterns, traits and generics, error types, iterators, modules and crates. Fast if you know it, thorough if you don't.

      1. 01Functions and expressions vs statements
      2. 02Enums and exhaustive pattern matching
      3. 03Pattern syntax: destructuring, guards, bindings
      4. 04Option and Result basics
      5. 05Custom error types and From
      6. 06Generics and monomorphization
      7. 07Traits, trait bounds, where clauses
      8. 08Associated types and generic traits
      9. 09Iterator trait and adapters
      10. 10Modules, visibility and use
      11. 11Crates, workspaces and features
      12. 12Unit, integration and doc tests
    2. How the compiler hands a macro its input as token trees, the fragment specifiers, repetitions, arm order and what hygiene does and does not protect.

      1. 01Token trees and macro parsing
      2. 02Fragment specifiers
      3. 03Repetitions and separators
      4. 04Multiple arms and matching order
      5. 05Hygiene and its limits
    3. Where a macro is visible, exporting it from a library, $crate, and reading the errors a macro produces.

      1. 01Textual vs path scope and #[macro_export]
      2. 02$crate and macros in libraries
      3. 03Debugging macros and compile_error!
    4. Internal rules, TT munchers, push-down accumulation and counting: the techniques behind serious macro_rules! DSLs.

      1. 01Internal rules
      2. 02TT munchers
      3. 03Push-down accumulation
      4. 04Counting and callbacks
      5. 05Building a DSL with macro_rules!
    5. TokenStream and proc_macro2, a proc-macro crate with a testable core, parsing with syn and generating code with quote.

      1. 01proc_macro vs proc_macro2
      2. 02Proc-macro crate setup with a testable core
      3. 03Parsing with syn: DeriveInput, Data, Fields
      4. 04Generating code with quote!
    6. Writing derives that handle generics, helper attributes, enums and structs, and point their errors at the right span.

      1. 01A first derive macro
      2. 02Generics and split_for_impl
      3. 03Helper attributes
      4. 04Deriving for enums vs structs
      5. 05Errors with spans
    7. Wrapping functions, rewriting impls and modules, and parsing attribute arguments.

      1. 01Attribute macros that wrap functions
      2. 02Attribute macros on impls and modules
      3. 03Parsing attribute arguments
    8. Custom syntax with syn's Parse trait: punctuated lists, lookahead, custom keywords, and a small DSL.

      1. 01Custom syntax with the Parse trait
      2. 02Punctuated, lookahead and custom keywords
      3. 03A function-like DSL
    9. Spans and hygiene, syn's visitors for rewriting code, generating code users can live with, and what macros cost at compile time.

      1. 01Spans and hygiene: call_site and mixed_site
      2. 02syn Visit and VisitMut
      3. 03Ergonomics of generated code
      4. 04Compile-time cost of macros
    10. Testing expansions as data, snapshot tests, and compile-fail tests for the errors your macro promises.

      1. 01Unit-testing expansions with proc_macro2
      2. 02Snapshot tests of expansions
      3. 03Compile-fail tests
    11. Reading a real derive's design, then building a derive Builder and an instrumenting attribute macro over several lessons.

      1. 01Reading a serde_derive-style design
      2. 02Capstone: derive Builder
      3. 03Capstone: an instrumenting attribute macro
    1. The Rust concurrency rests on: ownership and borrowing, closures, smart pointers and interior mutability, threads, and Send and Sync. Fast if you know it, thorough if you don't.

      1. 01Ownership and move semantics
      2. 02References and borrowing rules
      3. 03Closures and capture modes
      4. 04Fn / FnMut / FnOnce
      5. 05Box, Rc, Arc
      6. 06RefCell, Cell and interior mutability
      7. 07Traits, trait bounds, where clauses
      8. 08Generics and monomorphization
      9. 09Lifetime annotations and elision
      10. 10Threads and JoinHandle
      11. 11Send and Sync
      12. 12Iterator trait and adapters
    2. Scoped threads that borrow, thread builders and panics, thread-local storage, and parking.

      1. 01Scoped threads
      2. 02Thread builder and panics across threads
      3. 03Thread-local storage
      4. 04Parking and unpark
    3. Mutex and poisoning, RwLock and starvation, condition variables, one-time initialisation, and avoiding deadlock by design.

      1. 01Mutex and poisoning
      2. 02RwLock and writer starvation
      3. 03Condvar
      4. 04Barrier, OnceLock and LazyLock
      5. 05Deadlocks and lock ordering
    4. Bounded channels and backpressure, crossbeam's channels and select, and pipelines that fan out and back in.

      1. 01sync_channel and backpressure
      2. 02crossbeam channels and select
      3. 03Pipelines with fan-out and fan-in
    5. The atomic types, compare-and-swap loops, fetch_update, and counters that stay correct under contention.

      1. 01Atomic types and operations
      2. 02compare_exchange and CAS loops
      3. 03fetch_update
      4. 04Atomic counters and statistics
    6. Happens-before, Relaxed, Release and Acquire, SeqCst and fences: what each ordering guarantees and what it costs.

      1. 01Happens-before
      2. 02Relaxed ordering
      3. 03Release and Acquire
      4. 04SeqCst
      5. 05Fences
    7. A spin lock, a one-shot channel, Arc, Mutex, Condvar and RwLock, written from atomics up.

      1. 01A spin lock
      2. 02A one-shot channel
      3. 03Arc from scratch
      4. 04Mutex and Condvar on futex-style waiting
      5. 05RwLock from scratch
    8. A Treiber stack, the ABA problem, safe memory reclamation, and a single-producer ring buffer.

      1. 01Treiber stack
      2. 02The ABA problem
      3. 03Memory reclamation: epochs and hazard pointers
      4. 04SPSC ring buffer
    9. Exhaustively model-checking concurrent code with loom, and what stress tests can and cannot prove.

      1. 01Model checking with loom
      2. 02Stress testing concurrent code
    10. rayon's parallel iterators, join and scope, and how work stealing keeps every core busy.

      1. 01rayon par_iter
      2. 02rayon join and scope
      3. 03Work stealing
    11. False sharing, sharding to cut contention, and choosing the right primitive for the job.

      1. 01False sharing and cache padding
      2. 02Sharding to reduce contention
      3. 03Choosing a primitive
    12. A concurrent cache with eviction and a thread pool with graceful shutdown, built and verified over several lessons.

      1. 01Concurrent cache with eviction
      2. 02Thread pool with graceful shutdown
    1. The Rust this module builds on: structs and enums, generics and traits, lifetimes, closures, iterators and smart pointers. Fast if you know it, thorough if you don't.

      1. 01Structs and methods
      2. 02Enums and exhaustive pattern matching
      3. 03Generics and monomorphization
      4. 04Traits, trait bounds, where clauses
      5. 05impl Trait and default methods
      6. 06Lifetime annotations and elision
      7. 07Structs holding references
      8. 08'static and lifetime bounds
      9. 09Closures and capture modes
      10. 10Iterator trait and adapters
      11. 11Box, Rc, Arc
      12. 12Deref, Drop, Weak
    2. Coherence and the orphan rule, blanket impls, how method calls are resolved, supertraits and upcasting, and the auto traits.

      1. 01Coherence and the orphan rule
      2. 02Blanket impls
      3. 03Method resolution: autoref and autoderef
      4. 04Supertraits and trait upcasting
      5. 05Auto traits: Send, Sync, Unpin, Sized
    3. Which traits can be dyn and why, vtables and fat pointers, dynamically sized types, and downcasting with Any.

      1. 01dyn compatibility rules
      2. 02vtables and fat pointers
      3. 03DSTs and ?Sized
      4. 04Any and downcasting
    4. Associated types versus generic parameters, associated consts, generic associated types, and impl Trait in traits.

      1. 01Associated types vs generic parameters
      2. 02Associated consts
      3. 03Generic associated types
      4. 04impl Trait in traits
    5. Variance and subtyping, PhantomData and drop check, higher-ranked bounds, reborrowing, and where the borrow checker still says no.

      1. 01Variance and subtyping
      2. 02PhantomData and drop check
      3. 03HRTBs with closures
      4. 04Reborrowing and two-phase borrows
      5. 05Limits of NLL
    6. Const generics, const fn, zero-sized types, and typestate APIs that make invalid states fail to compile.

      1. 01Const generics
      2. 02const fn
      3. 03Zero-sized types
      4. 04Typestate APIs
    7. From and TryFrom, AsRef and Borrow, Cow, and when each one is the right signature.

      1. 01From, Into and TryFrom
      2. 02AsRef and Borrow
      3. 03Cow and ToOwned
    8. The full iterator family, indexing, consistent Eq, Ord and Hash, and Display, Debug and Error done properly.

      1. 01The iterator trait family
      2. 02Index and IndexMut
      3. 03Eq, Ord and Hash consistency
      4. 04Display, Debug and Error design
    9. Builders, sealed and extension traits, newtypes, visitors and library error types: the patterns behind crates people enjoy using.

      1. 01Builders
      2. 02Sealed traits
      3. 03Extension traits
      4. 04Newtype and the Deref anti-pattern
      5. 05Visitor and double dispatch
      6. 06Library error types
    10. Which changes to traits and types break your users, and how to evolve an API without a major version.

      1. 01Semver hazards in traits and types
    11. A typed state-machine API and a generic container with the full iterator suite, designed and built over several lessons.

      1. 01Typed state-machine API
      2. 02Generic container with the full iterator suite

Buy it like a book. Use it like a coach.

No subscription. You buy credits once and they never expire. A typical lesson uses about one credit; a long conversation or a redo uses a bit more, a quick one less. Nothing is ever cut short.

Free start

The Course

Top-up

Price

$0

$49once

$10or $25

Credits

1, no card needed

50, covers a typical learner through one full module

10 or 30 more, once you own the Course

Every module, every feature

Coach hints and line-by-line trace

Code review on every submit

Quick checks, review cards, streaks

Expires

never

never

never

What if I run out mid-lesson? A reply that starts with credit left always finishes. At zero, the coach pauses until you top up; nothing you did is lost. The Account page shows what is left.

$49 once — covers a typical learner through one full module. Add more modules with top-ups. Card payments via Stripe, plus VAT where it applies. Credits are non-refundable except where the law requires otherwise.

Terms and conditions apply.

Questions

Isn’t this just Claude?

The coach’s replies come from Claude, by Anthropic. Everything around them is rustcoach: a sandbox that compiles your code and runs real cargo test and clippy, five modules with a syllabus each with mastery per topic, notes on you that carry from lesson to lesson, spaced review cards, and a coach that won’t write your solution, even when you ask.

I’ve never programmed. Is this for me?

Yes. The coach teaches from what you already know, so with no background it starts further back and goes slower. The Course’s 50 credits are sized for people who already program a bit in another language, so a complete beginner may need a top-up along the way.

How long does the course take?

As long as it takes you: a chapter ends when the coach signs it off, not after a set number of hours. A typical lesson uses about one credit, and the Course’s 50 credits cover a typical learner through one full module if you already program a bit in another language.

Do I need Core Rust before a deep-dive module?

If you are new to Rust, start with Core Rust: it takes you through the whole language, in the order it is easiest to learn. If you already know some Rust and want to go deeper into one subject, go straight to that module. Each deep-dive module opens with a short Foundations chapter where the coach checks the Rust it builds on and fills any gaps, and topics you have already covered in Core Rust start ticked off.

Do I pay per module?

No. Credits are shared by every module on your account. The Course’s 50 credits cover a typical learner through one full module; top-ups pay for the next.

Can I use it from my IDE?

Not yet. Everything happens in the browser: an editor with hints, a line-by-line trace, clippy notes in the gutter and a scratch.rs for trying things out. Nothing to install.

What happens if I run out of credits mid-lesson?

A reply that starts with credit left always finishes. At zero, the coach pauses until you top up. Your lesson, code and progress stay exactly where they were.

Can I check my level before signing up?

Yes. The free Rust test takes about ten minutes, needs no account, and ends with your level, a shareable report, and the module that fits you best.

Krzysztof Grajek

Who builds rustcoach

Krzysztof Grajek

I’ve discovered Rust and have become an enthusiastic advocate for its ecosystem. I’m actively working to attract more developers and projects to Rust, sharing insights on its memory safety, concurrency model, and growing adoption in production environments.

Let’s connect if you’re passionate about functional programming, Rust, or building enterprise-grade solutions that make a difference!

Connect on LinkedIn

rustcoachTermsPrivacyRefundsContact

Terms of Service

Last updated: 24 September 2026

1. Who we are

1.1. rustcoach is operated by SOFTBERRIES Krzysztof Grajek, ul. Zagonowa 1/1, 82-300 Elbląg, Poland, VAT ID (NIP): PL5782712816 (the "Provider", "we").

1.2. You can contact us at support@rustcoach.dev or through the contact page.

1.3. These Terms of Service (the "Terms") are the regulations for services provided by electronic means within the meaning of article 8 of the Polish Act of 18 July 2002 on Providing Services by Electronic Means.

2. Definitions

2.1. "Service": the rustcoach web application, an AI coach that teaches Rust in conversation, writes assignments, runs your tests in a sandbox and reviews your code.

2.2. "User" ("you"): any person who creates an account and uses the Service.

2.3. "Consumer": a User who is a natural person using the Service for purposes not directly related to their trade or profession. Where required by Polish law, provisions protecting Consumers also apply to a sole trader using the Service for purposes not of a professional character for them (przedsiębiorca na prawach konsumenta).

2.4. "Credit" and "credits": prepaid coaching on your account. One credit is a fixed amount of the coach's model time (section 6).

3. The Service

3.1. The Service offers lessons written for you by an AI coach, assignments verified by running your code, code review, quick checks, spaced review cards and a per-account syllabus with progress.

3.2. AI disclosure. The coach is an artificial-intelligence system, not a human. Its lessons, hints, explanations and reviews are generated by an AI language model. This notice is given in accordance with article 50 of Regulation (EU) 2024/1689 (the AI Act).

3.3. The coach may make mistakes. The Service is a learning aid; it does not provide certified instruction, examinations or qualifications.

4. Technical requirements

4.1. You need a device with internet access and a current version of Chrome, Firefox, Safari or Edge, and an active email address.

4.2. The Service uses a strictly necessary session cookie, two short-lived cookies during Google sign-in, and local browser storage for editor preferences, as described in the Privacy Policy. Visits are counted with privacy-friendly, cookieless analytics hosted on our own server (Umami), also described there. No advertising trackers are used.

5. Account and eligibility

5.1. Using the Service requires an account created with an email address or via Google sign-in, and acceptance of these Terms.

5.2. The Service is intended for users aged 16 or older. By creating an account you confirm that you are at least 16.

5.3. You are responsible for keeping your credentials confidential and for activity on your account. One account per person; accounts are personal and non-transferable.

6. Credit, prices and payment

6.1. Coaching is prepaid. Every account starts with one free credit. More can be bought as one-time purchases:

  • Free start: $0, no card required, 1 credit.
  • The Course: $49, 50 credits. In our experience enough for one full module for a typical learner who already programs in another language; how far it goes depends on how you use the coach.
  • Top-up: $10 for 10 credits, or $25 for 30 credits, available to accounts that have bought the Course.

6.2. Prices are stated in US dollars and exclude VAT; the price shown at checkout includes the VAT applicable to you.

6.3. One credit is $0.60 of the coach's metered model time at list prices; every reply, review, hint, trace and explanation the coach produces is metered against your credits as it happens. A typical lesson uses about one credit; a long conversation or a redo of a topic uses more, a quick one less. Nothing is cut short: a turn that starts with credit left always completes. The Account page shows what is left and every purchase.

6.4. Credits are tied to your account, cannot be transferred, resold or exchanged for cash, and stay usable for as long as the Service operates. When they run out, the coach pauses until you top up; nothing you did is lost. Free, promotional and goodwill credits have no cash value.

6.5. Payments are processed by Stripe. We do not store your card details. Receipts are issued through Stripe.

6.6. There is no subscription. Nothing renews and we never charge you without a purchase you make yourself.

7. Contract conclusion

7.1. A contract for the Service is concluded when you complete registration (free start) or when you complete a checkout for Credit.

7.2. The free contract is for an indefinite period. You may end it at any time by asking us to delete your account (section 13.4).

8. Right of withdrawal (Consumers)

8.1. As a Consumer you may withdraw from a purchase within 14 days of it, without giving any reason.

8.2. To withdraw, send an unequivocal statement to support@rustcoach.dev, for example using the model withdrawal form in the Annex (you are not obliged to use the form). To meet the deadline it is enough to send the statement before it expires. We confirm receipt by email.

8.3. Immediate availability of Credit. Credit is added to your account the moment the purchase completes. By buying, you expressly request that we begin providing the service immediately, before the end of the withdrawal period, and you acknowledge that if you then withdraw, you pay for the part already used. If you withdraw, we refund the price paid minus a proportional amount for the credits used from that purchase, within 14 days, using the same payment method.

8.4. Free start. The right of withdrawal also applies to the free contract. Since nothing was paid, withdrawal is exercised by asking us to delete your account.

9. Refunds

9.1. Credits are non-refundable, whether used or unused, except where the law requires otherwise: the consumer right of withdrawal in section 8, the statutory remedies for non-conformity in section 11, and any other right that mandatory consumer law gives you. Credits are not exchangeable for cash.

9.2. If you were charged in error or charged twice, write to us and we correct it. The refund policy repeats these rules in short form.

10. Acceptable use

10.1. You must not supply unlawful content through the Service, including content that infringes third-party rights or is intended to harass or harm others.

10.2. You must not: (a) attempt to gain unauthorised access to the Service or its infrastructure, or to break out of the code sandbox; (b) mine cryptocurrency, attack other systems or run anything in the sandbox other than your assignment; (c) interfere with or disrupt the Service, including by automated bulk access, scraping or reselling access; (d) attempt to extract, reverse-engineer or misuse the underlying AI models; (e) share your account or automate the creation of accounts to obtain free Credit.

10.3. We may suspend or restrict an account that violates this section, after notifying you by email where reasonably possible, and may terminate the contract for material or repeated violations (section 12.3).

11. Conformity and complaints

11.1. We are liable to Consumers for the conformity of the Service with the contract under the statutory regime for digital services in chapter 5b of the Polish Consumer Rights Act of 30 May 2014. If the Service does not conform with the contract, you may demand that it be brought into conformity and, on the statutory conditions, demand a price reduction or withdraw from the contract.

11.2. Complaints can be submitted to support@rustcoach.dev or through the contact page. Please describe the problem, your account email and, where relevant, the lesson concerned.

11.3. We respond to Consumer complaints within 14 days of receipt. If we do not respond within that time, the complaint is deemed accepted.

12. Changes to the Service, closing it, and termination

12.1. Changes. rustcoach is a small service and it will keep changing. We may add, change or remove features, models, syllabus content and limits. Changes that reduce what your existing Credit buys are announced by email at least 14 days before they take effect.

12.2. Closing the Service. We may discontinue the Service, in whole or in part, at any time, including because running it is no longer viable. If we shut the Service down we give at least 30 days' notice by email, during which you can keep using your Credit and ask for a copy of your data. Unused Credit is not refunded on closure except where mandatory law requires it; free, promotional and goodwill Credit is never refunded.

12.3. Termination by us. We may terminate the contract without notice for material or repeated breaches of section 10, after the suspension procedure in 10.3 where appropriate. Unused Credit on an account terminated for breach is not refunded.

12.4. Inactive accounts. An account with no activity for three years may be closed after an email notice sent 30 days in advance; any Credit left on it is then forfeited.

13. Your content, intellectual property, deletion

13.1. The Service, including its software, design and course material, is protected by the intellectual-property rights of the Provider or its licensors. Do not copy, scrape or resell it.

13.2. Code you write stays yours. You grant us only the licence technically necessary to provide the Service: storing your code and lesson conversations, running your tests and sending your code to the AI model for review, as described in the Privacy Policy.

13.3. AI-generated lessons, hints and reviews are provided for your personal learning use.

13.4. You may delete your account at any time from the Account page (or by email to support@rustcoach.dev). The account is signed out at once and permanently deleted 30 days later; signing in during those 30 days cancels the deletion. Deleting your account ends the contract, and any unused credits are forfeited with it, subject to your right of withdrawal in section 8 for purchases made in the previous 14 days.

14. Liability

14.1. Nothing in these Terms excludes or limits liability that cannot be excluded or limited under applicable law, including the Provider's liability toward Consumers and toward sole traders using the Service on consumer terms, and liability for damage caused intentionally, which is never excluded.

14.2. We are not liable for interruptions or degraded quality caused by force majeure, failures of third-party networks or AI providers, your internet connection, or your equipment not meeting section 4.

14.3. We may carry out scheduled maintenance, announced in advance where reasonably possible. Maintenance does not consume your Credit.

14.4. Non-consumers only. Toward Users who are not Consumers (and not sole traders on consumer terms): (a) our total liability under the contract is limited to the amounts you paid us in the 12 months preceding the event giving rise to the claim; and (b) we are not liable for lost profits. These limits do not apply to damage caused intentionally.

15. Changes to these Terms

15.1. We may change these Terms for valid reasons, such as changes in law, changes to the Service's features, security needs, or changes to prices or third-party costs.

15.2. We notify you of changes by email at least 14 days before they take effect, indicating the effective date. The app also asks you to accept the new version before you continue using it.

15.3. If you do not accept the changes, you may terminate the contract before the effective date by asking us to delete your account; credits bought within the previous 14 days are refunded under section 8. Price changes never affect credits you already hold.

16. Out-of-court dispute resolution

16.1. If we reject a Consumer complaint, we state in our response whether we agree to take part in out-of-court dispute resolution (ADR) proceedings and, if so, identify the competent ADR entity.

16.2. Consumers in Poland may, among other options, seek assistance from the Voivodeship Inspectorate of Trade Inspection (Wojewódzki Inspektorat Inspekcji Handlowej) competent for their place of residence and from the municipal or district consumer ombudsman (miejski/powiatowy rzecznik konsumentów). These options are voluntary for both parties.

17. Governing law and jurisdiction

17.1. These Terms are governed by Polish law. If you are a Consumer, this choice of law does not deprive you of the protection afforded by mandatory consumer-protection provisions of the law of the country of your habitual residence (article 6 of Regulation (EC) No 593/2008, Rome I).

17.2. Disputes with Consumers are resolved by the courts having jurisdiction under generally applicable law. For non-consumers, the court competent for the Provider's seat has jurisdiction.

18. Personal data and final provisions

18.1. How we process personal data is set out in the Privacy Policy, which forms part of the pre-contractual information but not of the contract terms.

18.2. These Terms are provided in English, free of charge, before contract conclusion, in a form allowing storage and reproduction (this page can be saved or printed). If any provision is found invalid, the remaining provisions remain in force.

Annex: model withdrawal form

(complete and return this form only if you wish to withdraw from the contract)

To: SOFTBERRIES Krzysztof Grajek, ul. Zagonowa 1/1, 82-300 Elbląg, Poland, email: support@rustcoach.dev

I/We(*) hereby give notice that I/We(*) withdraw from my/our(*) contract for the supply of the following service: rustcoach Credit (purchase: ……………, date: ……………)

Name of the consumer(s): ……………
Address of the consumer(s): ……………
Account email address: ……………
Signature of the consumer(s) (only if this form is notified on paper): ……………
Date: ……………

(*) Delete as appropriate.

rustcoachTermsPrivacyRefundsContact

Privacy Policy

Last updated: 29 September 2026

1. Controller

1.1. The controller of your personal data is SOFTBERRIES Krzysztof Grajek, ul. Zagonowa 1/1, 82-300 Elbląg, Poland, VAT ID (NIP): PL5782712816.

1.2. Contact for all privacy matters: support@rustcoach.dev.

1.3. This policy explains how we process personal data when you use rustcoach, an AI Rust coach ("Service"). Terms defined in the Terms of Service have the same meaning here.

2. What data we process

2.1. Account data: email address, optional name, password hash (or Google account identifier if you sign in with Google), account creation date, which version of the Terms you accepted, and your reminder-email preference.

2.2. Learning data: lesson conversations with the coach, assignments and the code you write and submit, test and lint output, quick-check answers, review cards and answers, the coach's syllabus notes and mastery estimates about your progress, and the days on which you were active.

2.3. Usage and Credit data: token counts and metered cost per coach turn, and the ledger of credits granted, bought and adjusted. Your balance is computed from these.

2.4. Billing data: your Stripe customer id and a record of each purchase (product, amount, Stripe session id). Payment and invoice records are held by Stripe; we never see your full card details.

2.5. Email log: which account emails and reminders we sent you and when, so no email is sent twice.

2.6. Contact form: the name, email address and message you send us.

2.7. Technical data: the session cookie, and server logs (including IP addresses) kept for security, rate limiting and troubleshooting.

2.8. Usage statistics: which pages and screens are opened, the referring site, browser, operating system, device type, screen size, language and country. They are collected with Umami, an open-source analytics tool that runs on our own server, uses no cookies and does not collect personal data. A visit is counted with a one-way hash of the IP address, browser and website combined with a salt that changes every month, so visitors cannot be recognised over longer periods. Screen addresses are sent without account identifiers or sign-in links.

2.9. Embedded video: the home page shows a preview image of a video, served from our own server. Nothing is loaded from YouTube until you click play. When you do, your browser loads the player from youtube-nocookie.com (YouTube’s privacy-enhanced mode), and YouTube receives your IP address and browser data. We receive nothing from YouTube about you.

2.10. Rust test results: the questions you were asked, your answers and your score, stored without your name, email or IP address. Anyone with a result’s link sees its summary: the score, level, a bar per area and the recommended module. Your strongest and weakest topics and the questions with your answers are shown only to you. If you save a result to your account, it is linked to your account; deleting your account detaches it but leaves the shared link working.

3. Purposes and legal bases (GDPR)

PurposeDataLegal basis
Providing the Service: generating lessons, hints, explanations and reviews with the AI model, running your code, tracking progresslearning data, account dataContract performance, art. 6(1)(b) GDPR
Account management, login, Credit accountingaccount, usage and Credit dataContract performance, art. 6(1)(b) GDPR
Providing the Rust skills test and its result pageRust test results (section 2.10)Legitimate interest, art. 6(1)(f) GDPR
Briefing your coach on a saved test result, to start your first lessons at your levelRust test results (section 2.10)Consent, art. 6(1)(a) GDPR, with your consent via the checkbox, withdrawable at any time with the toggle on the result page
Invoicing, tax and accounting recordsbilling dataLegal obligation, art. 6(1)(c) GDPR
Security, abuse and fraud prevention, rate limiting, troubleshootingtechnical dataLegitimate interest, art. 6(1)(f) GDPR
Aggregate usage statistics to understand which pages are used and improve the Serviceusage statistics (section 2.8)Legitimate interest, art. 6(1)(f) GDPR
Reminder emails about your own learning (service-related, not marketing)email address, email logLegitimate interest, art. 6(1)(f) GDPR, with opt-out (section 6)
Answering contact-form messages, complaints, withdrawal requests and legal claimscontact-form data, account and billing data, correspondenceLegal obligation and legitimate interest, art. 6(1)(c) and (f) GDPR

3.1. The coach adapts lessons to what you have learned. This is content personalisation with no legal or similarly significant effect on you. We carry out no automated decision-making within the meaning of art. 22 GDPR.

4. Recipients and international transfers

We share data only with the processors needed to run the Service:

ProcessorRoleLocationTransfer mechanism
AnthropicAI model: lesson conversations and submitted code are sent to the Claude API to generate the coach's replies and reviewsUSStandard Contractual Clauses (SCCs)
StripePayments, receipts, VATUSEU-US Data Privacy Framework
GoogleSign in with Google (OAuth) onlyUSEU-US Data Privacy Framework
BrevoAccount emails, reminders, delivery of contact-form messagesEU (France)n/a (EU)
OVHcloud (OVH Hosting Inc.)Application hosting: server, database, code sandbox and the self-hosted Umami analyticsCanada (Beauharnois, Québec)EU adequacy decision for Canada (Commission Decision 2002/2/EC)

4.1. Copies of the relevant safeguards can be requested at support@rustcoach.dev. We do not sell personal data and do not share it with advertisers.

4.2. YouTube is not our processor. If you play the video on the home page (section 2.9), Google, which runs YouTube, processes your data as an independent controller under its own privacy policy: https://policies.google.com/privacy.

5. Retention

DataRetention
Account data, learning data, usage and credit ledger, email loguntil account deletion (30 days after your request), plus up to 30 days in backups
Rust test results (section 2.10)an unfinished test is deleted after 7 days; a finished result is kept indefinitely, because a result you shared keeps its link working. Deleting your account detaches a saved result from it rather than deleting the result, so a shared link keeps working without identifying you
Payment records (held by Stripe)5 full tax years, as required by Polish tax law
Contact-form messagesup to 12 months in our support mailbox, longer only while a complaint or claim is open
Server logsup to 30 days

6. Reminder emails

6.1. We send occasional reminder emails about your own learning: an open lesson, review cards piling up, a quiet few weeks. These are service-related messages, not marketing, sent on the basis of our legitimate interest in supporting your use of the Service, never more than one every three days.

6.2. Reminders are enabled by default. You can turn them off at any time with the switch on the Account page or the one-click link in every reminder email. Account emails (verification, password reset, receipts, running-low notices) are not affected.

7. Cookies and local storage

7.1. We use only strictly necessary storage: rc_session, the sign-in cookie, lifetime 30 days; rc_oauth_state and rc_terms, two cookies that live 10 minutes during a Google sign-in; and local browser storage for editor preferences (pane sizes, whether hints and traces were shown, the file you had open), for the onboarding tour state, a note that you are signed in, so the site can skip the landing page on your next visit, and, if you take a Rust test before signing in, a one-time token that lets you save that result to your account afterwards – strictly necessary to link a result you took anonymously to the account you sign into next, and cleared from your browser on sign-out or account deletion.

7.2. Our analytics (Umami, section 2.8) sets no cookies and stores nothing on your device. We use no advertising and no third-party tracking cookies, so no cookie consent banner is required.

7.3. During checkout you are redirected to stripe.com, where Stripe sets its own cookies under its own policy: https://stripe.com/cookies-policy/legal.

7.4. If you click play on the video on the home page, YouTube may store cookies or similar data on your device under its own policy. This happens only after that click; before it, no YouTube content is loaded.

8. Your rights

8.1. Under the GDPR you have the right to: access your data; rectification; erasure; restriction of processing; data portability; and to object to processing based on legitimate interest (including reminder emails, section 6).

8.2. To exercise any right, email support@rustcoach.dev or use the contact page. We respond within one month (extendable by two months for complex requests, with notice).

8.3. Account deletion: delete your account from the Account page, or ask us by email from the address on your account. The account is signed out at once and, after a 30-day grace period during which signing in restores it, permanently erased: email, name, password, Google sign-in link, lessons, messages, code, usage and credit records. Payment records stay with Stripe as long as tax law requires (section 5). Backups are purged within a further 30 days.

8.4. Complaint to a supervisory authority: you may lodge a complaint with the President of the Personal Data Protection Office (Prezes UODO), ul. Stawki 2, 00-193 Warszawa, Poland, uodo.gov.pl, or with the supervisory authority of your habitual residence.

9. Children

9.1. The Service is intended for users aged 16 or older. We do not knowingly process data of children under 16. If you believe a child under 16 has created an account, contact us and we will delete it.

10. Security

10.1. We apply technical and organisational measures appropriate to the risk, including encrypted transmission (TLS), hashed passwords, access controls, rate limiting, and running your code in an isolated sandbox with no network access.

11. Changes to this policy

11.1. We may update this policy, for example when we change processors or features. We notify account holders of material changes by email at least 14 days before they take effect. The current version is always available in the Service.

rustcoachTermsPrivacyRefundsContact

Refund Policy

Last updated: 22 September 2026. The short form of sections 8, 9 and 12 of the Terms of Service, which prevail.

Within 14 days of a purchase

If you are a consumer you can withdraw from any purchase within 14 days of making it, no reason needed. Because credit is available immediately, you asked us at checkout to start right away; we therefore refund the price minus a proportional amount for the credits you used from that purchase, within 14 days, to the original payment method. Send us a plain statement, or the model form at the end of the Terms, from the address on your account.

Everything else

Credits are non-refundable, used or unused, except where the law requires otherwise. They stay on your account and never expire. If you were charged in error or charged twice, write to us and we correct it. If the service does not work as promised, the complaints procedure below applies. An account closed for breaking the terms is not refunded, and free, promotional or goodwill credits are never refunded.

Complaints

If something did not work as promised, tell us: we answer consumer complaints within 14 days, and if we do not, the complaint counts as accepted.

How to reach us

Email support@rustcoach.dev from the address on your account, or use the contact page, with the purchase date and amount. Refunds go back to the original payment method via Stripe, usually within 5 to 10 business days.

SOFTBERRIES Krzysztof Grajek, ul. Zagonowa 1/1, 82-300 Elbląg, Poland, VAT ID (NIP): PL5782712816.

rustcoachTermsPrivacyRefundsContact

The terms have changed

Before you continue, please read and accept the current version.

Everything on your account stays as it is. What changed is written down in the Terms of Service, the Privacy Policy and the Refund Policy; the short version is that credits are non-refundable except where the law requires it, and that the service can be changed or closed.

Skip to content

0

Assignment

Tests (read-only)

·0 lines

Run tests to see results here.

      Raw output

      Choose your module

      Each module is its own course with its own lessons and progress. Your credits work in all of them, and you can add or switch modules any time.

      来源:Hacker News · rustcoach.dev