You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+21-8Lines changed: 21 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -6,17 +6,14 @@ probably want to check out the repository and make sure that tests pass for you:
6
6
```
7
7
$ git clone https://github.com/rust-lang/stdarch
8
8
$ cd stdarch
9
-
$ cargo +nightly test
9
+
$ TARGET="<your-target-arch>" ci/run.sh
10
10
```
11
11
12
-
To run codegen tests, run in release mode:
12
+
Where `<your-target-arch>` is the target triple as used by `rustup`, e.g. `x86_x64-unknown-linux-gnu` (without any preceding `nightly-` or similar).
13
+
Also remember that this repository requires the nightly channel of Rust!
14
+
The above tests do in fact require nightly rust to be the default on your system, to set that use `rustup default nightly` (and `rustup default stable` to revert).
13
15
14
-
```
15
-
$ cargo +nightly test --release -p coresimd
16
-
```
17
-
18
-
Remember that this repository requires the nightly channel of Rust! If any of
19
-
the above steps don't work, [please let us know][new]!
16
+
If any of the above steps don't work, [please let us know][new]!
20
17
21
18
Next up you can [find an issue][issues] to help out on, we've selected a few
22
19
with the [`help wanted`][help] and [`impl-period`][impl] tags which could
@@ -71,10 +68,26 @@ of the [Rust Book] describes the `rustdoc` syntax quite well. As always, feel fr
71
68
to [join us on gitter][gitter] and ask us if you hit any snags, and thank you for helping
72
69
to improve the documentation of `stdarch`!
73
70
71
+
# Alternative Testing Instructions
72
+
73
+
It is generally recommended that you use `ci/run.sh` to run the tests.
74
+
However this might not work for you, e.g. if you are on Windows.
75
+
76
+
In that case you can fall back to running `cargo +nightly test` and `cargo +nightly test --release -p core_arch` for testing the code generation.
77
+
Note that these require the nightly toolchain to be installed and for `rustc` to know about your target triple and its CPU.
78
+
In particular you need to set the `TARGET` environment variable as you would for `ci/run.sh`.
79
+
In addition you need to set `RUSTCFLAGS` (need the `C`) to indicate target features, e.g. `RUSTCFLAGS="-C -target-features=+avx2"`.
80
+
You can also set `-C -target-cpu=native` if you're "just" developing against your current CPU.
81
+
82
+
Be warned that when you use these alternative instructions, [things may go less smoothly than they would with `ci/run.sh`][ci-run-good], e.g. instruction generation tests may fail because the disassembler named them differently, e.g. it may generate `vaesenc` instead of `aesenc` instructions despite them behaving the same.
83
+
Also these instructions execute less tests than would normally be done, so don't be surprised that when you eventually pull-request some errors may show up for tests not covered here.
0 commit comments