gpui-cc Course handbook
REFERENCE / FIELD NOTES

Course research

Research into CodeCrafters and Learn WebGPU.

On this page

Status (24 Nov 2026): Primary-source research and acceptance recommendations only. No course, starter, tester, or framework was implemented, and no upstream code or benchmarks were run. Public CodeCrafters source provides a much stronger comparison than the catalog alone; it is not proof of the exact deployed member experience.

Task to define before authoring

Produce a complete, self-paced C++20/Linux project course in which the learner extends one reusable UI framework from a small runnable starter through a real interactive application. Use CodeCrafters HTTP Server as the benchmark for small tasks with explicit observable contracts and feedback, and the user’s linked learn-webgpu.com as the benchmark for technical explanation and quick feedback from editing real code. These are separate requirements: deep explanations must not turn the primary challenge into a copy-along walkthrough, and terse tasks must not replace teaching. An outline plus one authored lesson is a pilot, not the deliverable. No CodeTrain, watcher, account, or hosted submission flow is needed for the proposed course; verification should run on demand on the learner’s machine.

1. What CodeCrafters actually ships

The official overview promises a scoped HTTP/1.1 project built on TCP primitives, not full HTTP compliance. The public course definition at e086ba4 holds stage IDs, difficulty, concept links, extension membership, marketing copy, and 21 language slugs including C++. The full task prose lives in the separate stage descriptions directory, even though the generic authoring docs describe an inline description_md field. Follow the actual HTTP repository, not just the generic schema.

Track / difficulty Stage Published contract (paraphrased)
Base / very easy Bind to a port at4 Listen on TCP 4221. The source puts the explicit connect probe and note inside an HTML comment; the starter and public tester independently corroborate the first operation.
Base / very easy Respond with 200 ia4 Respond to GET with HTTP/1.1 200 OK\r\n\r\n; request parsing can wait.
Base / easy Extract URL path ih0 A random non-root path gets 404; / continues to get 200.
Base / easy Respond with body cn2 /echo/{str} returns the string as the 200 body, with text/plain and its byte length.
Base / easy Read header fs3 /user-agent echoes the request’s User-Agent with content headers; notes call out case-insensitive header names.
Base / easy Concurrent connections ej5 Answer requests on multiple concurrently open TCP connections. The source has JavaScript and TypeScript conditional explanations.
Base / medium Return a file ap6 --directory roots /files/{filename}; existing file returns bytes, length, and application/octet-stream; missing file gets 404.
Base / medium Read request body qv8 POST creates the named file under --directory with the request body and returns 201. Both response and disk state matter.
Compression / easy Compression headers df4 Reply with Content-Encoding: gzip when supported; omit it for unsupported input. Actual compression deliberately deferred.
Compression / medium Multiple compression schemes ij8 Select supported gzip from a comma-separated list; omit the response header when none is supported.
Compression / medium Gzip compression cr8 Emit binary gzip of the echo body and a compressed byte length, with the specified response headers.
Persistence / medium Persistent connections ag9 Serve two sequential requests independently over the same TCP connection.
Persistence / medium Concurrent persistent connections ul1 Handle multiple long-lived connections without mixing per-connection state or responses.
Persistence / medium Connection closure kh7 Keep alive until requested to close; then reply with Connection: close and actually close.

How the task reads. The official writing guide recommends Hook → Explanation → Tests → optional Notes. cn2 demonstrates it: one new endpoint, annotated request/response showing byte framing, exact invocation and sample input, a list of assertions, and further reading. The example string is not the contract; the response must reflect the actual input. ap6 shows the positive and negative cases and spells out the external setup. The planning guide asks authors to keep the first two or three stages small, split larger work where possible, and know how each stage will be invoked and tested. Its difficulty bands are estimates for a proficient developer, not promises to learners or requirements to copy the number of stages.

Starter and language support. The challenge workflow docs describe language selection, generated Git repo, test commit, and an initially failing test followed by a first-stage change. The actual compiled HTTP C++ starter contains src/main.cpp (logging plus commented first-stage socket code), CMake and vcpkg files, codecrafters.yml, a local your_program.sh, and separate .codecrafters/compile.sh and .codecrafters/run.sh. Its README points to the entry point and codecrafters submit; the program interface distinguishes local execution from remote build/compile/run. The inspected starter targets C++23, not the requested C++20; copy the onboarding pattern, not its toolchain. The starter authoring guide explains generating the first solution by uncommenting marked lines and testing starters in CI; the C++ docs explain CMake/vcpkg. Language-specific tailoring is part of the model; duplicating 21 language tracks is not.

Public tester behavior versus the hosted experience

  • Real public checker, not just curl in prose. The official Go tester at c071f34 maps each of the 14 IDs to a test function with a 15-second stage timeout in its definition. The same definition lists your_program.sh as current and your_server.sh as legacy: the README and older-looking fixture transcripts use the legacy name. The tester starts the executable and registers teardown; it drives the app over TCP, checks parsed status/reason, required headers or exact body when specified, and checks side effects where relevant. The instrumented connection generates a curl-equivalent log and can show sent/received bytes, rather than shelling out to curl for those probes. The stage-1 failure fixture names the launch, attempted TCP connection, app output, and early-exit reason. The debug docs document opt-in verbose traces and the [your_program] log prefix.
  • Behavioral assertions, not verbatim sample matching. The assertion helper checks named headers, not their order. The base success transcript shows a generated echo string and file data, and headers reversed relative to the prose sample. Concurrency probes two rounds and reverses the first request order to avoid a false pass from the listen backlog alone. Gzip checks compressed length and decompressed equality, not the published hex literal. The prose also asks for Content-Type: text/plain there; the public stage-11 expected-header list itself checks only Content-Encoding. The 404 stage function only probes a random missing path, while / is separately covered by ia4. Treat prose, per-case code, and the selected full regression run as distinct evidence.
  • Regression and test-the-tester. Tester self-tests seed the RNG for output fixtures, check exit status/logs for starter-like failure, timeout, success, and rejected shortcut, and exercise the base and both extensions with known implementations. Shared runner code uses bounded cases, executes teardown, and stops at the first failed selected case. The authoring guide recommends pairing each stage with a tester case and testing against a reference implementation. The Course SDK is author tooling with Docker-based workflow and all/specific-stage reference solution tests, not the learner CLI.
  • “Run from your local machine” is not “run offline.” CLI docs show codecrafters test without manually committing, and --previous for previous stages first. The public CLI source at 8e88ac7 creates a temporary repo copy/commit, pushes to the CodeCrafters remote, and requests a submission with current_and_previous_descending by default or current_and_previous_ascending with --previous. The early feedback loop and cumulative checks are worth adapting; remote Git plumbing is not necessary and would not satisfy the proposed offline test loop.
  • Access limits. The overview says stage instructions can be studied for free but displays GitHub login prompts when signed out; the direct stage fetch did not yield the full rendered page. The overview advertises membership for HTTP submissions and viewing solutions. General membership docs describe partial free access to user examples without confirming exact HTTP entitlements. Public source contains task templates, starter files, a solutions/ tree, and tester fixtures; it does not establish exact rendered language/reader variants, who can see each solution in the UI, production tester revision/configuration, or private operational checks. No authenticated run, hidden-case comparison, or live parity claim.

2. What Learn WebGPU contributes

The site the user linked. learn-webgpu.com links to northprint/learn-webgpu, not to Élie Michel’s separate book of the same title. At revision 63bac2c, its English first-triangle chapter breaks a concrete image into shader basics, pipeline setup, and render commands, then varies the result with color and multiple triangles. Its tutorial page source puts the editor, execution and console state, and preview canvas into the same lesson. The C++ course can preserve this feedback distance with one local check or replay command, a concrete preview or transcript, and a small follow-up variation. It need not create a browser IDE.

Supplementary reference, not the requested site. Élie Michel’s book is a useful example of longer technical exposition:

First Color defines one visible checkpoint (a solid-colored window), breaks it into surface configuration, per-frame texture acquisition, and a clear render pass, and explains why through a swap-chain illustration, resource ownership, and the configure/acquire/submit/present sequence. It points to placement in existing code, names “do not resize yet” as a boundary, and pairs a concrete device error with a specific GLFW setup check. It ends with an expected screenshot, caveat about color-space differences, and a resulting code snapshot.

A first Vertex Attribute starts from a limitation of the preceding checkpoint, traces the path from CPU data through buffer layout/stride/format to shader input, distinguishes overloaded terms, and includes examples in two API styles, device limit checks, a final image, and linked resulting code. That is depth spent on decisions and invariants, not word count. The guide home labels chapter readiness and warns readers to pair examples with their matching dependency versions. The linked First Color snapshot declares C++17 in CMake; this is a pedagogy reference, not a C++20 or automated-testing reference. These snapshots were inspected, not built; the new course must prove its own snapshots match its text.

Proposed synthesis: Put the short, actionable challenge and exact checks up front. Follow with a substantive concept chapter or linked “under the hood” section: what changes from the prior checkpoint, one concrete trace or diagram, why invariants and lifetime/order rules matter, common failure symptoms and how to observe them, scope boundaries, and primary-source links. Use small illustrative examples rather than give away the target implementation in the task. Make hints progressively revealing and provide an optional, clearly separated reference checkpoint for recovery and comparison.

3. What is actually GPUI-inspired

Use GPUI-CE at 1fe3d947698287f3ba50ef074a3eadd1ad46b84c as the design evidence, not an API or performance target. The pinned README demonstrates builder-style layout and styling, entity-backed state with explicit notify, focus-scoped typed actions/keybindings, virtualized lists, and custom drawing. The element source describes an element tree generated from the root view, laid out and painted, with persistent state outside transient elements. Its test context provides controlled input and resize and notes the ordering between drawing and hit testing.

Proposed minimum outcome: A learner-written library used by a separate native Linux demo, covering the frame lifecycle, declarative composition and bounded layout, drawing, hit-testing/input dispatch, persistent state/invalidation, and keyboard focus/actions. A headless verification path should exercise the same core used by the demo. Define precisely what “from scratch” owns (e.g. framework semantics) versus substrate allowed as a dependency (e.g. OS/window or graphics interop). Virtualization, sophisticated text shaping, backend breadth, and optimization can be scoped extensions unless explicitly promised in the core. Pin and label original C++ choices versus upstream analogues. Do not promise Rust API parity, all-platform support, or full GPUI feature parity.

Benchmark verification only: At that pin the source has Criterion benchmarks for WGPU renderer workloads (headless quad/batch cases, wait variants, and scene-plan compilation/traversal), Parley text pipeline, and glyph rasterization (first versus cached glyph); separate performance tooling measures marked tests via hyperfine. These verify workload/tool existence, not numerical results or portable thresholds. Favor counted work/invariants for learner pass gates when performance concepts matter; make machine-dependent timing informational unless a controlled benchmark environment is part of the specification.

4. Proposed deliverables and acceptance gates

Deliverable Release evidence
Course map with a bounded core and any extensions Every advertised stage has an ID, prerequisites, new observable behavior, and final learner outcome. Every item advertised as included is fully authored; future work is explicitly outside scope.
All learner-facing stages Every stage has the CodeCrafters task/test shape and the appropriate Learn WebGPU-style explanation. Include a runnable command or manual probe, concrete inputs and expected results, rule boundaries, failure interpretation, and optional hints. A reader can tell exactly where to start and what passes without an assistant.
Learner starter and setup/run instructions Clean install/build and launch on the supported Linux baseline; strict C++20; supplied files and learner-owned code distinguished. First test reaches a meaningful red without breaking toolchain setup and has a small first green. No prebuilt core or progression through replacing the learner tree.
Public on-demand verifier and fixtures Per-stage, prerequisite regression, and complete-core modes, with extension dependencies explicit. Show stage/case, exact input or replay seed, expected versus observed, fixable infrastructure errors versus behavior failures, and useful verbose output. Bounded run/cleanup, meaningful exit codes, no watcher/agent/account. Document setup downloads separately from offline verification.
Reference checkpoints and capstone Per-stage checkpoints or reproducible equivalent, isolated from the learner tree. Each passes its applicable stages; the previous checkpoint passes its own checks and fails the new advertised behavior. The capstone builds and uses the library in a separate real app and demonstrates the core end-to-end; both headless assertions and a native smoke check have evidence.
Course QA bundle Contract ↔ case ↔ checkpoint traceability for every stage; clean-clone evidence, test-the-tester negative fixtures, regression transcript, and an independent learner-style run reading only published materials. Keep the course and verification assets versioned together.

Failsafes

Failure mode Guardrail
A well-written pilot is mistaken for a finished course Approve a pilot privately to calibrate the format, but gate release on a stage coverage matrix with zero missing lessons, fixtures, or checkpoint validations for the promised core.
Tests silently demand more or less than the prose Review every assertion against the written contract and run published examples. Cover positive, negative, and boundary behavior; distinguish examples from invariants and explicitly defer later semantics.
Sample values are hard-coded, or the headless path bypasses the framework Use disclosed variation with replayable seeds and representative fixtures, compare observable behavior rather than private class names or incidental serialization, and demonstrate that native and headless exercise shared code. Include a wrong-but-plausible implementation as a negative QA fixture.
GPU, fonts, DPI, compositor, or timers make red/green unreliable Use explicit dimensions/DPI, fixed resources, an injected event stream/clock and synthetic traces or deterministic offscreen output for core checks. Keep native smoke separate; do not require exact whole-window screenshots across drivers. A missing prerequisite is not a pass.
Cumulative testing creates hidden prerequisites or hangs Encode dependencies, use fresh per-case state and timeouts, and make regression selection visible. Check the new case and its prerequisites on every release, including expected teardown/timeout behavior.
It is either a clone tutorial or an underspecified puzzle Have a learner reviewer attempt early, middle, and late stages before opening hints or reference answers; then do a complete clean pass. Compare the actual learner experience against the sources above, not just heading names.
Scope grows into reimplementing all of GPUI or a graphics stack Require a supported Linux/toolchain and dependency decision, a named native capstone, a narrow definition of the framework API, and written non-goals before stage counting. Revisit untestable scope before promising it.