Write. Run. Explain.
書く。動かす。説明する。

This offline page accompanies the extracted educational workspace. Rust executes in your terminal, not this page.
展開した教材workspaceの入口。Rustはこのページではなく、手元のターミナルで動く。

Start in the extracted rust-hands-on folder / 展開したfolderから始める

cargo run --offline -p exercises --example practice
cargo test --offline -p fundamentals
./scripts/start-practice.sh
cd work/hands-on

Edit the copy's src/lib.rs and record observations.md. The starter refuses to overwrite your existing practice.
コピーのsrc/lib.rsを編集し、observations.mdへ記録する。既存の練習folderは上書きしない。

  1. 01 · greeting: Predict empty and nonempty names. / 空と通常の名前を予想する。
  2. 02 · sum_even: Test negative values and integer width. / 負の数と整数の幅を試す。
  3. 03 · char_count + first_word: Compare bytes, scalar values, and borrowing. / バイト・スカラー値・借用を比べる。
  4. 04 · maximum: Represent empty input with Option. / 空の入力をOptionで表す。
  5. 05 · parse_nonnegative: Inspect both Ok and Err. / OkとErrを観察する。
cargo run --offline --example practice -- ex01 Ada
cargo test --offline ex01 -- --ignored

First TODO panic is intentional. Replace one TODO, run its test, compare results, then add a counterexample.
初回のTODO panicは想定どおり。1つ実装し、個別テスト、結果比較、反例の追加へ進む。

Open README.md or README.ja.md in the workspace root in your editor. Detailed textbook files are in lessons/, courses/, and docs/. Optional reference answers remain separate in hands-on/reference.rs.
ルートのREADME.md/README.ja.mdをエディタで読む。教科書はlessons/・courses/・docs/。任意の参考解答はhands-on/reference.rsに分離してある。