]> git.lizzy.rs Git - rust.git/blob - src/doc/rustc/src/targets/custom.md
Auto merge of #50275 - kennytm:rollup, r=kennytm
[rust.git] / src / doc / rustc / src / targets / custom.md
1 # Custom Targets
2
3 If you'd like to build for a target that is not yet supported by `rustc`, you can use a
4 "custom target specification" to define a target. These target specification files
5 are JSON. To see the JSON for the host target, you can run:
6
7 ```bash
8 $ rustc +nightly -Z unstable-options --print target-spec-json
9 ```
10
11 To see it for a different target, add the `--target` flag:
12
13 ```bash
14 $ rustc +nightly -Z unstable-options --target=wasm32-unknown-unknown --print target-spec-json
15 ```
16
17 To use a custom target, see [`xargo`](https://github.com/japaric/xargo).