Skip to content

Commit c4c02e8

Browse files
committed
Update readme
1 parent c051584 commit c4c02e8

File tree

1 file changed

+53
-16
lines changed

1 file changed

+53
-16
lines changed

README.md

+53-16
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,40 @@
1-
# The Rust Programming Language
1+
# The Rust Programming Language For Xtensa processors
2+
3+
This fork enables projects to be built for the ESP32 and ESP8266 using [espressif's llvm fork](https://github.com/espressif/llvm-project). The [esp-rs](https://github.com/esp-rs) organization has been formed to develop runtime, pac and hal crates for the esp32 and eventually esp8266.
4+
5+
Join in on the discussion: https://matrix.to/#/#esp-rs:matrix.org!
6+
7+
## Using this fork
8+
9+
The [quickstart repo](https://github.com/MabezDev/xtensa-rust-quickstart) has more information on how to build this fork and use it to build xtensa compatible code.
10+
11+
This is the main source code repository for [Rust]. It contains the compiler,
12+
standard library, and documentation.
13+
14+
To build this fork and have xtensa support, you need to make sure you pass in the --experimental-targets=Xtensa to configure as follows:
15+
```sh
16+
$ git clone https://github.com/MabezDev/rust-xtensa
17+
$ cd rust-xtensa
18+
$ ./configure --experimental-targets=Xtensa
19+
$ ./x.py build --stage 2
20+
```
21+
22+
## Updating this fork
23+
24+
The patch set can be found [here](https://github.com/MabezDev/rust-xtensa-patches). Checkout from upstream/master, apply the patches on at a time using `git am -3 < path/to/patch.patch`, fixing any conflicts if necessary (remember to PR the changes back to the patches [repo]((https://github.com/MabezDev/rust-xtensa-patches))). Once it builds submit a PR against this repo with the branch name `xtensa-update-$DATE`.
25+
26+
If the llvm submodule needs to be updated, the following should work:
27+
28+
```bash
29+
git submodule set-url src/llvm-project https://github.com/espressif/llvm-project
30+
git submodule set-branch -b $BRANCH_NAME src/llvm-project
31+
git submodule update --init --recursive --remote src/llvm-project
32+
```
33+
34+
Once accepted, the new branch will be renamed `xtensa-target`, hence making it the default.
35+
Don't worry about the README changes, I will port those across once I accept the PR.
36+
37+
---
238

339
This is the main source code repository for [Rust]. It contains the compiler,
440
standard library, and documentation.
@@ -7,7 +43,8 @@ standard library, and documentation.
743

844
**Note: this README is for _users_ rather than _contributors_.
945
If you wish to _contribute_ to the compiler, you should read the
10-
[Getting Started][gettingstarted] section of the rustc-dev-guide instead.**
46+
[Getting Started][gettingstarted] of the rustc-dev-guide instead of this
47+
section.**
1148

1249
## Quick Start
1350

@@ -41,8 +78,8 @@ by running `./x.py --help` or reading the [rustc dev guide][rustcguidebuild].
4178
2. Clone the [source] with `git`:
4279

4380
```sh
44-
git clone https://github.com/rust-lang/rust.git
45-
cd rust
81+
$ git clone https://github.com/rust-lang/rust.git
82+
$ cd rust
4683
```
4784

4885
[source]: https://github.com/rust-lang/rust
@@ -54,7 +91,7 @@ by running `./x.py --help` or reading the [rustc dev guide][rustcguidebuild].
5491
Copy the default `config.toml.example` to `config.toml` to get started.
5592

5693
```sh
57-
cp config.toml.example config.toml
94+
$ cp config.toml.example config.toml
5895
```
5996

6097
If you plan to use `x.py install` to create an installation, it is recommended
@@ -65,7 +102,7 @@ by running `./x.py --help` or reading the [rustc dev guide][rustcguidebuild].
65102
4. Build and install:
66103

67104
```sh
68-
./x.py build && ./x.py install
105+
$ ./x.py build && ./x.py install
69106
```
70107

71108
When complete, `./x.py install` will place several programs into
@@ -103,15 +140,15 @@ build.
103140
104141
```sh
105142
# Update package mirrors (may be needed if you have a fresh install of MSYS2)
106-
pacman -Sy pacman-mirrors
143+
$ pacman -Sy pacman-mirrors
107144
108145
# Install build tools needed for Rust. If you're building a 32-bit compiler,
109146
# then replace "x86_64" below with "i686". If you've already got git, python,
110147
# or CMake installed and in PATH you can remove them from this list. Note
111148
# that it is important that you do **not** use the 'python2', 'cmake' and 'ninja'
112149
# packages from the 'msys2' subsystem. The build has historically been known
113150
# to fail with these packages.
114-
pacman -S git \
151+
$ pacman -S git \
115152
make \
116153
diffutils \
117154
tar \
@@ -124,7 +161,7 @@ build.
124161
4. Navigate to Rust's source code (or clone it), then build it:
125162
126163
```sh
127-
./x.py build && ./x.py install
164+
$ ./x.py build && ./x.py install
128165
```
129166
130167
#### MSVC
@@ -142,7 +179,7 @@ With these dependencies installed, you can build the compiler in a `cmd.exe`
142179
shell with:
143180
144181
```sh
145-
python x.py build
182+
> python x.py build
146183
```
147184
148185
Currently, building Rust only works with some known versions of Visual Studio. If
@@ -151,8 +188,8 @@ you may need to force rustbuild to use an older version. This can be done
151188
by manually calling the appropriate vcvars file before running the bootstrap.
152189
153190
```batch
154-
CALL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
155-
python x.py build
191+
> CALL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
192+
> python x.py build
156193
```
157194
158195
#### Specifying an ABI
@@ -178,8 +215,8 @@ While it's not the recommended build system, this project also provides a
178215
configure script and makefile (the latter of which just invokes `x.py`).
179216
180217
```sh
181-
./configure
182-
make && sudo make install
218+
$ ./configure
219+
$ make && sudo make install
183220
```
184221
185222
When using the configure script, the generated `config.mk` file may override the
@@ -191,7 +228,7 @@ When using the configure script, the generated `config.mk` file may override the
191228
If you’d like to build the documentation, it’s almost the same:
192229
193230
```sh
194-
./x.py doc
231+
$ ./x.py doc
195232
```
196233
197234
The generated documentation will appear under `doc` in the `build` directory for
@@ -263,4 +300,4 @@ Third-party logos may be subject to third-party copyrights and trademarks. See
263300
[Licenses][policies-licenses] for details.
264301
265302
[media-guide]: https://www.rust-lang.org/policies/media-guide
266-
[policies-licenses]: https://www.rust-lang.org/policies/licenses
303+
[policies-licenses]: https://www.rust-lang.org/policies/licenses

0 commit comments

Comments
 (0)