Setting a WebAssembly build target
The Rust compiler can be set to compile to a different architecture. The architectures are also called targets. Targets can be identified by using target triple, a string that consists of three identifiers to be sent to the compiler. Examples of targets are x86_64-unknown-linux_gnu
and x86_64-apple-darwin
.
Targets can be categorized into three tiers, tier 1, tier 2, and tier 3:
- Tier 1 means that the target is guaranteed to work properly.
- Tier 2 means that the target is guaranteed to build but, sometimes, the automated test to build the binary for the targets may not pass. The host tools and full standard library for this tier are also supported.
- Tier 3 means that the Rust code base supports some features of the targets. The build for those targets may or may not exist, and the tooling might not be complete.
Remember that WebAssembly is a binary format for a virtual machine. The Rust compiler has targets for the virtual...