rust-lang / rust-lang/rfcs

Make code coverage measurement a requirement for Tier 2 (at least) target architectures

Open
#3,517 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

T-compiler
Dominant language
Markdown
Stars
6.6k
Forks
1.7k
Avg merge
16h 14m
Merged PRs (30d)
1

Description

I propose the following requirement for a target to be Tier 1 or Tier 2:

For a target P using architecture A (target_arch) to be Tier 2, there must exist a target T that has the same architecture (same target_arch) that supports the following requirements:

  • mainline QEMU supports that target, such that cargo test --target=T.
  • Rust's source-based code coverage must work for that target. (Presently this means that profiler builtins are enabled for the target.)
  • If there is a target that A--linux-gnu and/or A--linux-musl that would meet these requirements, then one (ideally both) of these targets must be made Tier 2 before, or at the same time, as any other target with the same architecture.
  • P and T must have the same calling convention / ABI.

In other words, I propose that in order for a target to be considered Tier 2 (or higher), it must be possible for us to actually run tests measure code coverage metrics for that architecture without jumping through hoops. I am not asking that every tier 2 (or higher) target support profiling because that might not be practical for us to do, e.g. aarch64-apple-ios or aarch64-pc-windows-*.

Currently there are many Tier 2 targets with architectures for which no target for that architecture supports profiler builtins. Examples: powerpc, powerpc64le, loongarch64.

Currently there are some Tier 2 targets with architectures for which it is difficult to get QEMU working. Examples: loongarch64 requires (AFAICT) either building their custom toolchain from source or using their provided binaries, which is not practical.

/cc @joshtriplett

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the proposed Tier 2 requirements, including cargo test --target=T, QEMU support, source-based coverage, profiler builtins, and ABI compatibility. No implementation file or test is named; done would require resolving the proposal and documenting an agreed target-architecture policy.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers, testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.