mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27: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:
@@ -55,12 +55,12 @@ By default, all Rust crates link the [standard library], which depends on the op
|
||||
We start by creating a new cargo application project. The easiest way to do this is through the command line:
|
||||
|
||||
```
|
||||
cargo new blog_os --bin --edition 2018
|
||||
cargo new blog_os --bin --edition 2024
|
||||
```
|
||||
|
||||
I named the project `blog_os`, but of course you can choose your own name. The `--bin` flag specifies that we want to create an executable binary (in contrast to a library) and the `--edition 2018` flag specifies that we want to use the [2018 edition] of Rust for our crate. When we run the command, cargo creates the following directory structure for us:
|
||||
I named the project `blog_os`, but of course you can choose your own name. The `--bin` flag specifies that we want to create an executable binary (in contrast to a library) and the `--edition 2024` flag specifies that we want to use the [2024 edition] of Rust for our crate. When we run the command, cargo creates the following directory structure for us:
|
||||
|
||||
[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
|
||||
|
||||
```
|
||||
blog_os
|
||||
|
||||
Reference in New Issue
Block a user