From 6de921aef43c7aa8811fbf422f4dd9f165bc1d43 Mon Sep 17 00:00:00 2001 From: jyn Date: Sat, 24 Jun 2023 11:12:40 -0500 Subject: [PATCH] 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. --- src/building/how-to-build-and-run.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/building/how-to-build-and-run.md b/src/building/how-to-build-and-run.md index d22efe34..7aee7a6d 100644 --- a/src/building/how-to-build-and-run.md +++ b/src/building/how-to-build-and-run.md @@ -57,6 +57,31 @@ if you want to learn more about `x.py`, [read this chapter][bootstrap]. [bootstrap]: ./bootstrapping.md +### Running `x.py` + +The `x.py` command can be run directly on most Unix systems in the following format: + +```sh +./x.py [flags] +``` + +This is how the documentation and examples assume you are running `x.py`. +Some alternative ways are: + +```sh +# On a Unix shell if you don't have the necessary `python3` command +./x [flags] + +# On Windows (if powershell is configured to run scripts) +./x.ps1 [flags] + +# On the Windows Command Prompt (if .py files are configured to run Python) +x.py [flags] + +# You can also run Python yourself, e.g.: +python x.py [flags] +``` + ### Running `x.py` slightly more conveniently There is a binary that wraps `x.py` called `x` in `src/tools/x`. All it does is