Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update x install documentation #2084

Merged
merged 1 commit into from
Oct 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions src/building/build-install-distribution-artifacts.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,25 @@ You’ll want to run this command to do it:
./x dist
```

# Install distribution artifacts
# Install from source

If you’ve built a distribution artifact you might want to install it and
test that it works on your target system. You’ll want to run this command:
You might want to prefer installing Rust (and tools configured in your configuration)
by building from source. If so, you want to run this command:

```bash
./x install
```

Note: If you are testing out a modification to a compiler, you
might want to use it to compile some project.
Usually, you do not want to use `./x install` for testing.
Rather, you should create a toolchain as discussed in
[here][create-rustup-toolchain].
Note: If you are testing out a modification to a compiler, you might
want to build the compiler (with `./x build`) then create a toolchain as
jieyouxu marked this conversation as resolved.
Show resolved Hide resolved
discussed in [here][create-rustup-toolchain].

For example, if the toolchain you created is called foo, you
would then invoke it with `rustc +foo ...` (where ... represents
the rest of the arguments).
For example, if the toolchain you created is called "foo", you would then
invoke it with `rustc +foo ...` (where ... represents the rest of the arguments).

[create-rustup-toolchain]: ./how-to-build-and-run.md#creating-a-rustup-toolchain
Instead of installing Rust (and tools in your config file) globally, you can set `DESTDIR`
environment variable to change the installation path. If you want to set installation paths
more dynamically, you should prefer [install options] in your config file to achieve that.

[create-rustup-toolchain]: ./how-to-build-and-run.md#creating-a-rustup-toolchain
[install options]: https://github.com/rust-lang/rust/blob/f7c8928f035370be33463bb7f1cd1aeca2c5f898/config.example.toml#L422-L442