mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Update post 1 to Rust edition 2024
Branch post-01 and all later branches already were already updated to
edition = "2024" in commit 86ffa24e (Update to Rust 2024 edition,
2025-03-27).
This commit is contained in:
@@ -57,12 +57,12 @@ Rust で OS カーネルを書くには、基盤となる OS なしで動く実
|
||||
新しい Cargo プロジェクトをつくるところから始めましょう。もっとも簡単なやり方はコマンドラインで以下を実行することです。
|
||||
|
||||
```bash
|
||||
cargo new blog_os --bin --edition 2018
|
||||
cargo new blog_os --bin --edition 2024
|
||||
```
|
||||
|
||||
プロジェクト名を `blog_os` としましたが、もちろんお好きな名前をつけていただいても大丈夫です。`--bin`フラグは実行可能バイナリを作成することを、 `--edition 2018` は[2018エディション][2018 edition]を使用することを明示的に指定します。コマンドを実行すると、 Cargoは以下のようなディレクトリ構造を作成します:
|
||||
プロジェクト名を `blog_os` としましたが、もちろんお好きな名前をつけていただいても大丈夫です。`--bin`フラグは実行可能バイナリを作成することを、 `--edition 2024` は[2024エディション][2024 edition]を使用することを明示的に指定します。コマンドを実行すると、 Cargoは以下のようなディレクトリ構造を作成します:
|
||||
|
||||
[2018 edition]: https://doc.rust-lang.org/nightly/edition-guide/rust-2018/index.html
|
||||
[2024 edition]: https://doc.rust-lang.org/nightly/edition-guide/rust-2024/index.html
|
||||
|
||||
```bash
|
||||
blog_os
|
||||
|
||||
Reference in New Issue
Block a user