|
| 1 | +# `target-name-here` |
| 2 | + |
| 3 | +**Tier: 3** |
| 4 | + |
| 5 | +One-sentence description of the target (e.g. CPU, OS) |
| 6 | + |
| 7 | +## Target maintainers |
| 8 | + |
| 9 | +- Some Person, `[email protected]`, https://github.com/... |
| 10 | + |
| 11 | +## Requirements |
| 12 | + |
| 13 | +Does the target support host tools, or only cross-compilation? Does the target |
| 14 | +support std, or alloc (either with a default allocator, or if the user supplies |
| 15 | +an allocator)? |
| 16 | + |
| 17 | +Document the expectations of binaries built for the target. Do they assume |
| 18 | +specific minimum features beyond the baseline of the CPU/environment/etc? What |
| 19 | +version of the OS or environment do they expect? |
| 20 | + |
| 21 | +Are there notable `#[target_feature(...)]` or `-C target-feature=` values that |
| 22 | +programs may wish to use? |
| 23 | + |
| 24 | +What calling convention does `extern "C"` use on the target? |
| 25 | + |
| 26 | +What format do binaries use by default? ELF, PE, something else? |
| 27 | + |
| 28 | +## Building the target |
| 29 | + |
| 30 | +If Rust doesn't build the target by default, how can users build it? Can users |
| 31 | +just add it to the `target` list in `config.toml`? |
| 32 | + |
| 33 | +## Building Rust programs |
| 34 | + |
| 35 | +Rust does not yet ship pre-compiled artifacts for this target. To compile for |
| 36 | +this target, you will either need to build Rust with the target enabled (see |
| 37 | +"Building the target" above), or build your own copy of `core` by using |
| 38 | +`build-std` or similar. |
| 39 | + |
| 40 | +## Testing |
| 41 | + |
| 42 | +Does the target support running binaries, or do binaries have varying |
| 43 | +expectations that prevent having a standard way to run them? If users can run |
| 44 | +binaries, can they do so in some common emulator, or do they need native |
| 45 | +hardware? Does the target support running the Rust testsuite? |
| 46 | + |
| 47 | +## Cross-compilation toolchains and C code |
| 48 | + |
| 49 | +Does the target support C code? If so, what toolchain target should users use |
| 50 | +to build compatible C code? (This may match the target triple, or it may be a |
| 51 | +toolchain for a different target triple, potentially with specific options or |
| 52 | +caveats.) |
0 commit comments