Repository navigation
Release 0.29.0 - #347
Merged
Merged
Release 0.29.0#347
Conversation
Contributor
Author
Release notes for maintainersCoverage: All nine PRs since 0.28.0 (#336–#340, #342–#344, #346) already had changelog entries, so I added none and left none out. None of them were dependency bumps, CI or bot changes. Breaking changes. 0.29.0 is a minor bump for a 0.x crate, so these are allowed. They would have to stay out of any 0.28.x patch release:
Things to check:
|
guybedford
approved these changes
Nov 24, 2026
|
🚀 0.29.0 is ready to publish, pending approval: https://github.com/wasm-bindgen/walrus/actions/runs/45318060986 Release: https://github.com/wasm-bindgen/walrus/releases/tag/0.29.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added
ModuleConfig::function_ordertakes a closure that decides the orderdefined functions are emitted, and so numbered, in. It is given every
defined function as a
FunctionInfo, with its size and how many times itsindex is written, in the default order (largest first) to reorder. For
example, sorting by
Reverse(f.uses())gives the shortest LEB128 indices tothe most-referenced functions, which makes most modules smaller. The default
order isn't guaranteed and may change; give a closure to depend on one.
ModuleConfig::generate_source_mapandModule::emit_wasm_with_source_mapbuild a source map of the emitted module from its DWARF, with the
Scopes of its functions
and inlined calls, and point the module at it with a
sourceMappingURLsection. Each source file gets a
Modulescope around theFunctionscopes of its functions, which the generic copies and shims of a function
share.
ModuleConfig::source_map_scopes(false)leaves the Scopes out, for a mapwith only mappings.
Changed
ifwhoseelsearm is empty is emitted without theelse, saving abyte per
if. This was a TODO in the emitter; parsing already turned amissing
elseinto an empty one.ModuleDebugData::dwarfis a gimlitype, so code that reads it needs gimli 0.34 too.
and
Cargo.tomldeclares it. gimli'sDwarf::convertAPI first shipped in0.33, which also requires 1.88.
ModuleDebugDatahas a private field, so it can no longer be built with astruct expression; use
Default.generate_dwarf,DW_AT_macros,DW_AT_macro_infoandDW_AT_GNU_macrosare removed. walrus never emitted the macro sectionsthey point into, because gimli can't write them.
parallelfeature, parsing finds the block types of legacycatchhandlers in parallel. This scan decodes every function body. It runs for
any module with a tag that has params, such as an Emscripten module built
with C++ exceptions, or with a function type that has two or more results.
Fixed
VisitorMut's per-instruction methods (visit_const_mutand so on) nolonger visit the instruction's fields by default. The traversal already
does that, so a
VisitorMutthat only overrode, say,visit_value_mutsawevery field twice.
Visitoralready behaved this way.visit_instr_seq_idis no longer called for the branch target ofbr_on_null,br_on_non_null,br_on_castandbr_on_cast_fail, matchingbr,br_ifandbr_table.visit_instr_seq_idis now called for legacytrycatchandcatch_allhandler blocks, matching the
trybody.generate_dwarf, location and range lists now follow the code walrusmoved. Offsets from a base address (DWARF 4
.debug_loc/.debug_rangesentries and DWARF 5
DW_LLE_offset_pair/DW_RLE_offset_pair) werepreviously treated as addresses or copied unchanged, so almost every
location list LLVM writes pointed at the wrong code. walrus now converts
DWARF with gimli's
Dwarf::convertAPI instead ofDwarf::from, whichgimli documents as unsuitable for complex address transformations.
generate_dwarfno longer panics on DWARF 5 line programs that use fileindex 0, as clang writes them.
its rows stay in address order after walrus reorders functions.
generate_dwarf, the local and global indices inDW_OP_WASM_locationare remapped to the ones walrus emits. walrus groupslocals by type and drops unused ones, so 10-24% of the local indices in
optimized Rust builds named the wrong local. Locations of removed locals
and globals are dropped.
generate_dwarf,DW_OP_addrkeeps its address. In Wasm it's alinear memory address of static data, but walrus treated it as a code
address, so the locations of static and global variables were replaced,
usually with the removed-code tombstone.
replace. Each line row, range, location list entry and code address is
derived from where its input instructions were emitted, so code that is
now in several places gets a
DW_AT_rangeslist, and a local a passreplaced is found through the instructions that used it. A variable whose
code was copied into another function, which numbers its locals
differently, gets a location list with the right local in each, and code
copied from another compile unit keeps its line rows. Previously
addresses were mapped through a table that kept one place per input
instruction.
133 instructions whose row was line 0 were given other lines.
delegatealso keeps its row now.