]> git.lizzy.rs Git - rust.git/blob - src/doc/rustc/src/targets/index.md
Rollup merge of #50257 - estebank:fix-49560, r=nikomatsakis
[rust.git] / src / doc / rustc / src / targets / index.md
1 # Targets
2
3 `rustc` is a cross-compiler by default. This means that you can use any compiler to build for any
4 architecture. The list of *targets* are the possible architectures that you can build for.
5
6 To see all the options that you can set with a target, see the docs
7 [here](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_back/target/struct.Target.html).
8
9 To compile to a particular target, use the `--target` flag:
10
11 ```bash
12 $ rustc src/main.rs --target=wasm32-unknown-unknown
13 ```