You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Prepend the nightly rustc path to your `$PATH` in order to use nightly (fish syntax): `set -U fish_user_paths $PREFIX/opt/rust-nightly/bin/ $fish_user_paths`
66
+
-`rustc --version` should now return a nightly version
67
+
68
+
### (Optional) Install Git and Clone your Repository
69
+
70
+
- Install git: `pkg install git`
71
+
- Clone a repository of your choice: `git clone https://github.com/phil-opp/blog_os.git`
- Add the cargo bin directory to your `$PATH` (fish syntax): `set -U fish_user_paths ~/.cargo/bin/ $fish_user_paths`
77
+
- Now `cargo xbuild` should be available.
78
+
79
+
It does not work yet because it needs access to the rust source code. By default it tries to use rustup for this, but we have no rustup support so we need a different way.
80
+
81
+
### Providing the Rust Source Code
82
+
83
+
The Rust source code corresponding to our installed nightly is available in the `its-pointless` repository:
- Set the `XARGO_RUST_SRC` environment variable to tell cargo-xbuild the source path (fish syntax): `set -Ux XARGO_RUST_SRC ~/rust-src-nightly/rust-src/lib/rustlib/src/rust/src`
88
+
89
+
Now cargo-xbuild should no longer complain about a missing `rust-src` component. However it will throw an I/O error after building the sysroot. The problem is that the downloaded Rust source code has a different structure than the source provided by rustup. We can fix this by adding a symbolic link:
0 commit comments