rust-lang / rust-lang/rust

Tracking issue: WASM rmake test coverage for `#[export_visibility]`

Open
#153,364 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-testsuite C-bug O-wasm
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

This is a follow-up to https://github.com/rust-lang/rust/pull/151431#issuecomment-3923604898 which suggested to open a separate issue for discussing end-to-end, rmake-based wasm testing of #[export_visibility] and what would be necessary for that.

IIUC this requires:

  • Enabling "wasm" crate feature of the object crate dependency in src/tools/run-make-support/Cargo.toml - something like: object = { version = "0.37", features = ["read", "compression", "wasm"] }
  • Tweaking fn dynamic_lib_prefix and fn dynamic_lib_extension in src/tools/run-make-support/src/artifact_names.rs to use WASM-related values from library/std/src/sys/env_consts.rs
  • Ensure that exported_dynamic_symbol_names works for wasm. It uses object::File::exports, which isn't implemented yet for wasm (as pointed out in https://github.com/rust-lang/rust/pull/151431#issuecomment-3919390374)

Contributor guide

Open the contributing guide

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 with src/tools/run-make-support/Cargo.toml, then inspect dynamic_lib_prefix and dynamic_lib_extension in src/tools/run-make-support/src/artifact_names.rs. Read how exported_dynamic_symbol_names uses object::File::exports and the linked discussions about WASM support. Done means the required end-to-end, rmake-based WASM coverage for #[export_visibility] is defined and the listed support gaps are addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, wasm
Domain
build-system, compilers, testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.