Skip to content

Commit 7cccbb7

Browse files
author
Travis Wagner
committed
use crablang readme
1 parent 539ff20 commit 7cccbb7

File tree

1 file changed

+86
-71
lines changed

1 file changed

+86
-71
lines changed

README.md

Lines changed: 86 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,38 @@
1-
# The Rust Programming Language
1+
<img src="https://user-images.githubusercontent.com/8974888/231858967-7c37bf1e-335b-4f5a-9760-da97be9f54bb.png" width="200" />
22

3-
[![Rust Community](https://img.shields.io/badge/Rust_Community%20-Join_us-brightgreen?style=plastic&logo=rust)](https://www.rust-lang.org/community)
3+
# The Crab Programming Language
44

5-
This is the main source code repository for [Rust]. It contains the compiler,
5+
[![CrabLang Community](https://img.shields.io/badge/CrabLang_Community%20-Join_us-brightgreen?style=plastic&logo=discord)](https://community.crablang.org)
6+
7+
This is the main source code repository for [Crab](https://github.com/crablang/crab). It contains the compiler,
68
standard library, and documentation.
79

8-
[Rust]: https://www.rust-lang.org/
10+
[CrabLang]: https://www.crablang.org/
911

1012
**Note: this README is for _users_ rather than _contributors_.**
1113
If you wish to _contribute_ to the compiler, you should read
1214
[CONTRIBUTING.md](CONTRIBUTING.md) instead.
1315

1416
## Quick Start
1517

18+
To get started with the renamed CrabLang toolchain, run the following:
19+
20+
```sh
21+
sh <(curl https://install.crablang.org -L)
22+
```
23+
24+
\* currently Unix only
25+
26+
<!--
1627
Read ["Installation"] from [The Book].
1728
18-
["Installation"]: https://doc.rust-lang.org/book/ch01-01-installation.html
19-
[The Book]: https://doc.rust-lang.org/book/index.html
29+
["Installation"]: https://doc.crablang.org/book/ch01-01-installation.html
30+
[The Book]: https://doc.crablang.org/book/index.html -->
2031

2132
## Installing from Source
2233

23-
The Rust build system uses a Python script called `x.py` to build the compiler,
34+
The Crab build system uses a Python script called `x.py` to build the compiler,
2435
which manages the bootstrapping process. It lives at the root of the project.
25-
It also uses a file named `config.toml` to determine various configuration
26-
settings for the build. You can see a full list of options in
27-
`config.example.toml`.
2836

2937
The `x.py` command can be run directly on most Unix systems in the following
3038
format:
@@ -34,14 +42,25 @@ format:
3442
```
3543

3644
This is how the documentation and examples assume you are running `x.py`.
37-
See the [rustc dev guide][rustcguidebuild] if this does not work on your
38-
platform.
45+
46+
Some alternative ways are:
47+
48+
```sh
49+
# On a Unix shell if you don't have the necessary `python3` command
50+
./x <subcommand> [flags]
51+
52+
# On the Windows Command Prompt (if .py files are configured to run Python)
53+
x.py <subcommand> [flags]
54+
55+
# You can also run Python yourself, e.g.:
56+
python x.py <subcommand> [flags]
57+
```
3958

4059
More information about `x.py` can be found by running it with the `--help` flag
41-
or reading the [rustc dev guide][rustcguidebuild].
60+
or reading the [crabc dev guide][crabcguidebuild].
4261

43-
[gettingstarted]: https://rustc-dev-guide.rust-lang.org/getting-started.html
44-
[rustcguidebuild]: https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html#what-is-xpy
62+
[gettingstarted]: https://crabc-dev-guide.crablang.org/getting-started.html
63+
[crabcguidebuild]: https://crabc-dev-guide.crablang.org/building/how-to-build-and-run.html
4564

4665
### Dependencies
4766

@@ -55,7 +74,7 @@ Make sure you have installed the dependencies:
5574
* `pkg-config` if you are compiling on Linux and targeting Linux
5675
* `libiconv` (already included with glibc on Debian-based distros)
5776

58-
To build Cargo, you'll also need OpenSSL (`libssl-dev` or `openssl-devel` on
77+
To build Crabgo, you'll also need OpenSSL (`libssl-dev` or `openssl-devel` on
5978
most Unix distros).
6079

6180
If building LLVM from source, you'll need additional tools:
@@ -71,33 +90,36 @@ If building LLVM from source, you'll need additional tools:
7190
On tier 1 or tier 2 with host tools platforms, you can also choose to download
7291
LLVM by setting `llvm.download-ci-llvm = true`.
7392
Otherwise, you'll need LLVM installed and `llvm-config` in your path.
74-
See [the rustc-dev-guide for more info][sysllvm].
93+
See [the crabc-dev-guide for more info][sysllvm].
7594

76-
[sysllvm]: https://rustc-dev-guide.rust-lang.org/building/new-target.html#using-pre-built-llvm
95+
[sysllvm]: https://crabc-dev-guide.crablang.org/building/new-target.html#using-pre-built-llvm
7796

7897

7998
### Building on a Unix-like system
8099

81-
#### Build steps
82-
83100
1. Clone the [source] with `git`:
84101

85102
```sh
86-
git clone https://github.com/rust-lang/rust.git
87-
cd rust
103+
git clone https://github.com/crablang/crab.git
104+
cd crab
88105
```
89106

90-
[source]: https://github.com/rust-lang/rust
107+
[source]: https://github.com/crablang/crablang
91108

92109
2. Configure the build settings:
93110

111+
The CrabLang build system uses a file named `config.toml` in the root of the
112+
source tree to determine various configuration settings for the build.
113+
Set up the defaults intended for distros to get started. You can see a full
114+
list of options in `config.example.toml`.
115+
94116
```sh
95-
./configure
117+
printf 'profile = "user" \nchangelog-seen = 2 \n' > config.toml
96118
```
97119

98120
If you plan to use `x.py install` to create an installation, it is
99121
recommended that you set the `prefix` value in the `[install]` section to a
100-
directory: `./configure --set install.prefix=<path>`
122+
directory.
101123

102124
3. Build and install:
103125

@@ -106,27 +128,12 @@ See [the rustc-dev-guide for more info][sysllvm].
106128
```
107129

108130
When complete, `./x.py install` will place several programs into
109-
`$PREFIX/bin`: `rustc`, the Rust compiler, and `rustdoc`, the
110-
API-documentation tool. By default, it will also include [Cargo], Rust's
111-
package manager. You can disable this behavior by passing
112-
`--set build.extended=false` to `./configure`.
113-
114-
[Cargo]: https://github.com/rust-lang/cargo
115-
116-
#### Configure and Make
117-
118-
This project provides a configure script and makefile (the latter of which just
119-
invokes `x.py`). `./configure` is the recommended way to programatically
120-
generate a `config.toml`. `make` is not recommended (we suggest using `x.py`
121-
directly), but it is supported and we try not to break it unnecessarily.
122-
123-
```sh
124-
./configure
125-
make && sudo make install
126-
```
131+
`$PREFIX/bin`: `crabc`, the CrabLang compiler, and `crablangdoc`, the
132+
API-documentation tool. If you've set `profile = "user"` or
133+
`build.extended = true`, it will also include [Crabgo], CrabLang's package
134+
manager.
127135

128-
`configure` generates a `config.toml` which can also be used with normal `x.py`
129-
invocations.
136+
[Crabgo]: https://github.com/crablang/crabgo
130137

131138
### Building on Windows
132139

@@ -147,23 +154,23 @@ from the Java documentation.
147154
[winget]: https://github.com/microsoft/winget-cli
148155

149156
There are two prominent ABIs in use on Windows: the native (MSVC) ABI used by
150-
Visual Studio and the GNU ABI used by the GCC toolchain. Which version of Rust
157+
Visual Studio and the GNU ABI used by the GCC toolchain. Which version of CrabLang
151158
you need depends largely on what C/C++ libraries you want to interoperate with.
152-
Use the MSVC build of Rust to interop with software produced by Visual Studio
159+
Use the MSVC build of CrabLang to interop with software produced by Visual Studio
153160
and the GNU build to interop with GNU software built using the MinGW/MSYS2
154161
toolchain.
155162

156163
#### MinGW
157164

158-
[MSYS2][msys2] can be used to easily build Rust on Windows:
165+
[MSYS2][msys2] can be used to easily build CrabLang on Windows:
159166

160167
[msys2]: https://www.msys2.org/
161168

162169
1. Download the latest [MSYS2 installer][msys2] and go through the installer.
163170

164171
2. Run `mingw32_shell.bat` or `mingw64_shell.bat` from the MSYS2 installation
165172
directory (e.g. `C:\msys64`), depending on whether you want 32-bit or 64-bit
166-
Rust. (As of the latest version of MSYS2 you have to run `msys2_shell.cmd
173+
CrabLang. (As of the latest version of MSYS2 you have to run `msys2_shell.cmd
167174
-mingw32` or `msys2_shell.cmd -mingw64` from the command line instead.)
168175

169176
3. From this terminal, install the required tools:
@@ -172,7 +179,7 @@ toolchain.
172179
# Update package mirrors (may be needed if you have a fresh install of MSYS2)
173180
pacman -Sy pacman-mirrors
174181

175-
# Install build tools needed for Rust. If you're building a 32-bit compiler,
182+
# Install build tools needed for CrabLang. If you're building a 32-bit compiler,
176183
# then replace "x86_64" below with "i686". If you've already got Git, Python,
177184
# or CMake installed and in PATH you can remove them from this list.
178185
# Note that it is important that you do **not** use the 'python2', 'cmake',
@@ -188,16 +195,16 @@ toolchain.
188195
mingw-w64-x86_64-ninja
189196
```
190197

191-
4. Navigate to Rust's source code (or clone it), then build it:
198+
4. Navigate to CrabLang's source code (or clone it), then build it:
192199

193200
```sh
194-
python x.py setup user && python x.py build && python x.py install
201+
./x.py build && ./x.py install
195202
```
196203

197204
#### MSVC
198205

199-
MSVC builds of Rust additionally require an installation of Visual Studio 2017
200-
(or later) so `rustc` can use its linker. The simplest way is to get
206+
MSVC builds of CrabLang additionally require an installation of Visual Studio 2017
207+
(or later) so `crabc` can use its linker. The simplest way is to get
201208
[Visual Studio], check the "C++ build tools" and "Windows 10 SDK" workload.
202209

203210
[Visual Studio]: https://visualstudio.microsoft.com/downloads/
@@ -209,13 +216,12 @@ With these dependencies installed, you can build the compiler in a `cmd.exe`
209216
shell with:
210217

211218
```sh
212-
python x.py setup user
213219
python x.py build
214220
```
215221

216-
Right now, building Rust only works with some known versions of Visual Studio.
222+
Right now, building CrabLang only works with some known versions of Visual Studio.
217223
If you have a more recent version installed and the build system doesn't
218-
understand, you may need to force rustbuild to use an older version.
224+
understand, you may need to force crablangbuild to use an older version.
219225
This can be done by manually calling the appropriate vcvars file before running
220226
the bootstrap.
221227

@@ -238,8 +244,21 @@ Windows build triples are:
238244

239245
The build triple can be specified by either specifying `--build=<triple>` when
240246
invoking `x.py` commands, or by creating a `config.toml` file (as described in
241-
[Building on a Unix-like system](#building-on-a-unix-like-system)), and passing
242-
`--set build.build=<triple>` to `./configure`.
247+
[Installing from Source](#installing-from-source)), and modifying the `build`
248+
option under the `[build]` section.
249+
250+
### Configure and Make
251+
252+
While it's not the recommended build system, this project also provides a
253+
configure script and makefile (the latter of which just invokes `x.py`).
254+
255+
```sh
256+
./configure
257+
make && sudo make install
258+
```
259+
260+
`configure` generates a `config.toml` which can also be used with normal `x.py`
261+
invocations.
243262

244263
## Building Documentation
245264

@@ -255,12 +274,12 @@ will be `build\x86_64-pc-windows-msvc\doc`.
255274

256275
## Notes
257276

258-
Since the Rust compiler is written in Rust, it must be built by a precompiled
277+
Since the CrabLang compiler is written in CrabLang, it must be built by a precompiled
259278
"snapshot" version of itself (made in an earlier stage of development).
260279
As such, source builds require an Internet connection to fetch snapshots, and an
261280
OS that can execute the available snapshot binaries.
262281

263-
See https://doc.rust-lang.org/nightly/rustc/platform-support.html for a list of
282+
See https://doc.crablang.org/nightly/crabc/platform-support.html for a list of
264283
supported platforms.
265284
Only "host tools" platforms have a pre-compiled snapshot binary available; to
266285
compile for a platform without host tools you must cross-compile.
@@ -270,15 +289,15 @@ build environments that are most likely to work.
270289

271290
## Getting Help
272291

273-
See https://www.rust-lang.org/community for a list of chat platforms and forums.
292+
Need help? Join us on discord at https://community.crablang.org!
274293

275294
## Contributing
276295

277296
See [CONTRIBUTING.md](CONTRIBUTING.md).
278297

279298
## License
280299

281-
Rust is primarily distributed under the terms of both the MIT license and the
300+
CrabLang is primarily distributed under the terms of both the MIT license and the
282301
Apache License (Version 2.0), with portions covered by various BSD-like
283302
licenses.
284303

@@ -287,15 +306,11 @@ See [LICENSE-APACHE](LICENSE-APACHE), [LICENSE-MIT](LICENSE-MIT), and
287306

288307
## Trademark
289308

290-
[The Rust Foundation][rust-foundation] owns and protects the Rust and Cargo
291-
trademarks and logos (the "Rust Trademarks").
292-
293-
If you want to use these names or brands, please read the
294-
[media guide][media-guide].
309+
If you want to use any names or brands associated with Crab or CrabLang, please feel free to do so in any capacity.
295310

296311
Third-party logos may be subject to third-party copyrights and trademarks. See
297312
[Licenses][policies-licenses] for details.
298313

299-
[rust-foundation]: https://foundation.rust-lang.org/
300-
[media-guide]: https://foundation.rust-lang.org/policies/logo-policy-and-media-guide/
301-
[policies-licenses]: https://www.rust-lang.org/policies/licenses
314+
[crablang-foundation]: https://foundation.crablang.org/
315+
[media-guide]: https://foundation.crablang.org/policies/logo-policy-and-media-guide/
316+
[policies-licenses]: https://www.crablang.org/policies/licenses

0 commit comments

Comments
 (0)