Skip to content

Commit f6e3f63

Browse files
sypharjyn514
authored andcommitted
Resolves #1428 - extend readme to include how to run builds on non-linux systems
1 parent b7010d7 commit f6e3f63

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

README.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,16 @@ which uses docker-compose for the web server as well.
9999
This will not cache dependencies - in particular, you'll have to rebuild all 400 whenever the lockfile changes -
100100
but makes sure that you're in a known environment so you should have fewer problems getting started.
101101

102+
You can also use the `web` container to run builds on systems which don't support running builds directly (mostly on Mac OS or Windows):
103+
```sh
104+
# run a build for a single crate
105+
docker-compose run web build crate regex 1.3.1
106+
# or build essential files
107+
docker-compose run web build add-essential-files
108+
# rebuild the web container when you changed code.
109+
docker-comose build web
110+
```
111+
102112
Note that running tests is not supported when using pure docker-compose.
103113

104114
Please file bugs for any trouble you have running docs.rs!
@@ -124,7 +134,7 @@ so this will be necessary anytime you make changes.
124134

125135
If you want to completely clean up the database, don't forget to remove the volumes too:
126136

127-
```
137+
```sh
128138
$ docker-compose down --volumes
129139
```
130140

@@ -139,10 +149,18 @@ This is probably because you have `git.autocrlf` set to true,
139149

140150
##### I see the error `/opt/rustwide/cargo-home/bin/cargo: cannot execute binary file: Exec format error` when running builds.
141151

142-
You are most likely not on a Linux platform. Currently, running builds is only supported on `x86_64-unknown-linux-gnu`.
152+
You are most likely not on a Linux platform. Running builds directly is only supported on `x86_64-unknown-linux-gnu`. On other platforms you can use the `docker-compose run web build [...]` workaround described above.
143153

144-
See [rustwide#41](https://github.com/rust-lang/rustwide/issues/41) for more details.
154+
See [rustwide#41](https://github.com/rust-lang/rustwide/issues/41) for more details about supporting more platforms directly.
145155

156+
##### All tests are failing or timing out
157+
158+
Our test setup needs a certain about of file descriptors.
159+
160+
At least 4096 should be enough, you can set it via:
161+
```sh
162+
$ ulimit -n 4096
163+
```
146164
### CLI
147165

148166
See `cargo run -- --help` for a full list of commands.
@@ -162,6 +180,9 @@ cargo run -- start-web-server
162180
# For example, `docker-compose run web build crate regex 1.1.6`
163181
cargo run -- build crate <CRATE_NAME> <CRATE_VERSION>
164182

183+
# alternatively, via the web container
184+
docker-compose run web build crate <CRATE_NAME> <CRATE_VERSION>
185+
165186
# Builds every crate on crates.io and adds them into database
166187
# (beware: this may take months to finish)
167188
cargo run -- build world

0 commit comments

Comments
 (0)