Skip to content

Commit 64dfa14

Browse files
MabezDevimarkov
authored andcommitted
Update readme
1 parent a859c4c commit 64dfa14

File tree

1 file changed

+55
-18
lines changed

1 file changed

+55
-18
lines changed

README.md

Lines changed: 55 additions & 18 deletions
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

@@ -51,7 +88,7 @@ by running it with the `--help` flag or reading the [rustc dev guide][rustcguide
5188
* `g++` 5.1 or later or `clang++` 3.5 or later
5289
* `python` 3 or 2.7
5390
* GNU `make` 3.81 or later
54-
* `cmake` 3.13.4 or later
91+
* `cmake` 3.4.3 or later
5592
* `ninja`
5693
* `curl`
5794
* `git`
@@ -61,8 +98,8 @@ by running it with the `--help` flag or reading the [rustc dev guide][rustcguide
6198
2. Clone the [source] with `git`:
6299

63100
```sh
64-
git clone https://github.com/rust-lang/rust.git
65-
cd rust
101+
$ git clone https://github.com/rust-lang/rust.git
102+
$ cd rust
66103
```
67104

68105
[source]: https://github.com/rust-lang/rust
@@ -74,7 +111,7 @@ by running it with the `--help` flag or reading the [rustc dev guide][rustcguide
74111
Copy the default `config.toml.example` to `config.toml` to get started.
75112

76113
```sh
77-
cp config.toml.example config.toml
114+
$ cp config.toml.example config.toml
78115
```
79116

80117
If you plan to use `x.py install` to create an installation, it is recommended
@@ -85,7 +122,7 @@ by running it with the `--help` flag or reading the [rustc dev guide][rustcguide
85122
4. Build and install:
86123

87124
```sh
88-
./x.py build && ./x.py install
125+
$ ./x.py build && ./x.py install
89126
```
90127

91128
When complete, `./x.py install` will place several programs into
@@ -110,7 +147,7 @@ build.
110147
111148
[MSYS2][msys2] can be used to easily build Rust on Windows:
112149
113-
[msys2]: https://www.msys2.org/
150+
[msys2]: https://msys2.github.io/
114151
115152
1. Grab the latest [MSYS2 installer][msys2] and go through the installer.
116153
@@ -123,15 +160,15 @@ build.
123160
124161
```sh
125162
# Update package mirrors (may be needed if you have a fresh install of MSYS2)
126-
pacman -Sy pacman-mirrors
163+
$ pacman -Sy pacman-mirrors
127164
128165
# Install build tools needed for Rust. If you're building a 32-bit compiler,
129166
# then replace "x86_64" below with "i686". If you've already got git, python,
130167
# or CMake installed and in PATH you can remove them from this list. Note
131168
# that it is important that you do **not** use the 'python2', 'cmake' and 'ninja'
132169
# packages from the 'msys2' subsystem. The build has historically been known
133170
# to fail with these packages.
134-
pacman -S git \
171+
$ pacman -S git \
135172
make \
136173
diffutils \
137174
tar \
@@ -144,7 +181,7 @@ build.
144181
4. Navigate to Rust's source code (or clone it), then build it:
145182
146183
```sh
147-
./x.py build && ./x.py install
184+
$ ./x.py build && ./x.py install
148185
```
149186
150187
#### MSVC
@@ -162,7 +199,7 @@ With these dependencies installed, you can build the compiler in a `cmd.exe`
162199
shell with:
163200
164201
```sh
165-
python x.py build
202+
> python x.py build
166203
```
167204
168205
Currently, building Rust only works with some known versions of Visual Studio. If
@@ -171,8 +208,8 @@ you may need to force rustbuild to use an older version. This can be done
171208
by manually calling the appropriate vcvars file before running the bootstrap.
172209
173210
```batch
174-
CALL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
175-
python x.py build
211+
> CALL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
212+
> python x.py build
176213
```
177214
178215
#### Specifying an ABI
@@ -198,8 +235,8 @@ While it's not the recommended build system, this project also provides a
198235
configure script and makefile (the latter of which just invokes `x.py`).
199236
200237
```sh
201-
./configure
202-
make && sudo make install
238+
$ ./configure
239+
$ make && sudo make install
203240
```
204241
205242
When using the configure script, the generated `config.mk` file may override the
@@ -211,7 +248,7 @@ When using the configure script, the generated `config.mk` file may override the
211248
If you’d like to build the documentation, it’s almost the same:
212249
213250
```sh
214-
./x.py doc
251+
$ ./x.py doc
215252
```
216253
217254
The generated documentation will appear under `doc` in the `build` directory for
@@ -283,4 +320,4 @@ Third-party logos may be subject to third-party copyrights and trademarks. See
283320
[Licenses][policies-licenses] for details.
284321
285322
[media-guide]: https://www.rust-lang.org/policies/media-guide
286-
[policies-licenses]: https://www.rust-lang.org/policies/licenses
323+
[policies-licenses]: https://www.rust-lang.org/policies/licenses

0 commit comments

Comments
 (0)