Skip to content

Commit 9a17247

Browse files
committed
Inline alternate x.py invocations from the rust-lang/rust readme
I'm going to make a follow-up PR shortly linking from rust-lang/rust to the dev guide so this info isn't duplicated.
1 parent 2c03abd commit 9a17247

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

Diff for: src/building/how-to-build-and-run.md

+25
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,31 @@ if you want to learn more about `x.py`, [read this chapter][bootstrap].
5757

5858
[bootstrap]: ./bootstrapping.md
5959

60+
### Running `x.py`
61+
62+
The `x.py` command can be run directly on most Unix systems in the following format:
63+
64+
```sh
65+
./x.py <subcommand> [flags]
66+
```
67+
68+
This is how the documentation and examples assume you are running `x.py`.
69+
Some alternative ways are:
70+
71+
```sh
72+
# On a Unix shell if you don't have the necessary `python3` command
73+
./x <subcommand> [flags]
74+
75+
# On Windows (if powershell is configured to run scripts)
76+
./x.ps1 <subcommand> [flags]
77+
78+
# On the Windows Command Prompt (if .py files are configured to run Python)
79+
x.py <subcommand> [flags]
80+
81+
# You can also run Python yourself, e.g.:
82+
python x.py <subcommand> [flags]
83+
```
84+
6085
### Running `x.py` slightly more conveniently
6186

6287
There is a binary that wraps `x.py` called `x` in `src/tools/x`. All it does is

0 commit comments

Comments
 (0)