Skip to content

Commit 2a00afa

Browse files
authored
Update to xargo 0.3.12 (#427)
1 parent 7a1c38a commit 2a00afa

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

Xargo.toml

Lines changed: 0 additions & 6 deletions
This file was deleted.

blog/content/second-edition/posts/02-minimal-rust-kernel/index.md

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -247,20 +247,9 @@ That's where [xargo] comes in. It is a wrapper for cargo that eases cross compil
247247
cargo install xargo
248248
```
249249

250-
Xargo depends on the rust source code, which we can install with `rustup component add rust-src`. It also requires a file named `Xargo.toml` in our project directory that specifies which crates of the so-called _“sysroot”_ it should build. To build just the required `core` and `compiler_builtins` crates, we create the following `Xargo.toml`:
250+
Xargo depends on the rust source code, which we can install with `rustup component add rust-src`.
251251

252-
```toml
253-
[dependencies.core]
254-
stage = 0
255-
256-
[dependencies.compiler_builtins]
257-
features = ["mem"]
258-
stage = 1
259-
```
260-
261-
The `stage` fields tell `Xargo` the order in which it should build things. The `compiler_builtins` crate requires the `core` crate itself, so it can only built in a second step after `core` has been compiled. So `core` is built in stage 0 and `compiler_builtins` is built in stage 1. The `mem` feature of `compiler_builtins` is required so that implementations for `memcpy`, `memset`, etc. are created.
262-
263-
Xargo is “a drop-in replacement for cargo”, so every cargo command also works with `xargo`. You can do e.g. `xargo --help`, `xargo clean`, or `xargo doc`. The only difference is that the build command has additional functionality: `xargo build` will automatically cross compile the `core` library when compiling for custom targets.
252+
Xargo is “a drop-in replacement for cargo”, so every cargo command also works with `xargo`. You can do e.g. `xargo --help`, `xargo clean`, or `xargo doc`. The only difference is that the build command has additional functionality: `xargo build` will automatically cross compile the `core` and `compiler_rt` libraries when compiling for custom targets.
264253

265254
Let's try it:
266255

0 commit comments

Comments
 (0)