Skip to content

Release 0.5.7 - #92

Merged
madonoharu merged 3 commits into
mainfrom
release/0.5.7
Aug 20, 2026
Merged

Release 0.5.7#92
madonoharu merged 3 commits into
mainfrom
release/0.5.7

Conversation

@madonoharu

@madonoharu madonoharu commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Prepares 0.5.7, the first release to contain Ts<T> — it landed in #71 after 0.5.6 was published, so the memory-leak fix has never reached anyone on crates.io.

Both crates, in order

The tsify-macros floor moves from 0.5.5 to 0.5.7 along with the version bump. The published 0.5.6 macro predates the Clone derive on JsType, which Ts<T> relies on — so bumping only the root crate would let an existing lockfile keep resolving 0.5.6 and break &Ts<T> parameters, the form the README recommends. The workspace builds from path dependencies, so CI cannot catch that on its own.

Publishing therefore has to go macro-first: tsify-macros → wait for the index → cargo publish --dry-run on the root against the registry version → root → tag. --dry-run on the root currently fails with failed to select a version for the requirement tsify-macros = "^0.5.7", which is the floor doing its job.

Found while reviewing the release candidate

  • IntoWasmAbi for &Ts<T> leaked. It cloned the JS handle, but the shim wasm-bindgen generates for a borrowed argument never releases it, so every &Ts<T> passed to an imported function dropped a table slot on the floor. wasm-bindgen's own extern types pass the handle by reference for exactly this reason; Ts<T> now does the same, and the Clone bound falls away with it.
  • The docs described code that doesn't exist. Only from_wasm_abi reaches throw_strinto_wasm_abi panics — so the CHANGELOG's "both leak the same way" was wrong. The README's #[tsify(namespace)] example still showed the pre-Make enum type aliases utilize the namespace types #78 union, contradicting this release's own CHANGELOG entry, and its .d.ts example predated the current output shape. Both are now what a build actually emits.
  • The e2e gate let failures through. build_all.sh had no set -e, so a failed wasm-pack build was followed by a successful popd; compare_output.sh skipped any reference whose generated counterpart was missing. Together those two turned a completely failed e2e build into a green run. A generics test also asserted SerNamedTuple where it meant DeNamedTuple.

Also

  • README's install snippet said tsify = "0.5.5" while demonstrating Ts<T>, which does not exist in 0.5.5 or 0.5.6.
  • Tsify::JsType now documents the contract the ABI impls already assume: it has to be a #[wasm_bindgen] extern "C" type.

🤖 Generated with Claude Code

madonoharu and others added 2 commits August 17, 2026 18:20
Raises the tsify-macros floor to 0.5.7 alongside the version bump. The
published 0.5.6 macro predates the Clone derive on JsType, which Ts<T>'s
Clone and its IntoWasmAbi for &Ts<T> both require, so a root-only bump
would let an existing lockfile keep resolving a macro that cannot build
`&Ts<T>` parameters.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Review of the release candidate turned up a leak in the type whose purpose
is to avoid them: IntoWasmAbi for &Ts<T> cloned the JS handle, but the shim
generated for a borrowed argument never releases it. wasm-bindgen's own
extern types pass the handle by reference for exactly this reason; match
that. The Clone bound falls away with it.

Docs corrected against what the code actually does: only from_wasm_abi
reaches throw_str (into_wasm_abi panics), and the README's namespace enum
and .d.ts examples predated the output they describe. Both are now what a
build emits.

The e2e gate was weaker than it looked: build_all.sh let a failed
wasm-pack build through, compare_output.sh skipped references whose
counterpart was missing, and a generics test asserted the wrong type.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…utput

The &Ts<T> leak was introduced and fixed between releases, so listing it
implies 0.5.6 shipped it. "Addresses" instead of "Resolves": #47 keeps an
upstream remainder and #86 an ergonomics one. The .d.ts sample now matches
a build byte for byte.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@madonoharu
madonoharu merged commit 747541c into main Aug 20, 2026
3 checks passed
@madonoharu
madonoharu deleted the release/0.5.7 branch August 20, 2026 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant