rust icon indicating copy to clipboard operation
rust copied to clipboard

Tracking issue for release notes of #128511: Document WebAssembly target feature expectations

Open rustbot opened this issue 1 year ago • 2 comments

This issue tracks the release notes text for #128511.

  • [x] Issue is nominated for the responsible team (and T-release nomination is removed).
  • [x] Proposed text is drafted by team responsible for underlying change.
  • [ ] Issue is nominated for release team review of clarity for wider audience.
  • [ ] Release team includes text in release notes/blog posts.

Release notes text:

The section title will be de-duplicated by the release team with other release notes issues. Prefer to use the standard titles from previous releases. More than one section can be included if needed.

# Compatibility Notes
- The WebAssembly target features `multivalue` and `reference-types` are now
  both enabled by default. These two features both have subtle changes implied
  for generated WebAssembly binaries. For the `multivalue` feature, WebAssembly
  target support has changed when upgrading to LLVM 19. Support for generating
  functions with multiple returns no longer works and
  `-Ctarget-feature=+multivalue` has a different meaning than it did in LLVM 18
  and prior. There is no longer any supported means to generate a module that has
  a function with multiple returns in WebAssembly from Rust source code. For the
  `reference-types` feature the encoding of immediates in the `call_indirect`, a
  commonly used instruction by the WebAssembly backend, has changed. Validators
  and parsers which don't understand the `reference-types` proposal will no
  longer accept modules produced by LLVM due to this change in encoding of
  immediates. Additionally these features being enabled are encoded in the
  `target_features` custom section and may affect downstream tooling such as
  `wasm-opt` consuming the module. Generating a WebAssembly module that disables
  default features requires `-Zbuild-std` support from Cargo and more information
  can be found at
  [rust-lang/rust#128511](https://github.com/rust-lang/rust/pull/128511).

Release blog section (if any, leave blank if no section is expected):

rustbot avatar Aug 25 '24 14:08 rustbot

Candidate Wasm target changes blog post: https://github.com/rust-lang/blog.rust-lang.org/pull/1385

Intended to be sent before the LLVM 19 changes reach stable to allow people to be aware of the changes earlier, subject to T-release approval.

jieyouxu avatar Aug 25 '24 15:08 jieyouxu

cc @alexcrichton in case you want to double-check :3

jieyouxu avatar Aug 26 '24 09:08 jieyouxu