Release 0.5.7 - #92
Merged
Merged
Conversation
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>
madonoharu
force-pushed
the
release/0.5.7
branch
from
August 17, 2026 09:33
3cda340 to
8e9050f
Compare
…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>
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.
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-macrosfloor moves from0.5.5to0.5.7along with the version bump. The published 0.5.6 macro predates theClonederive onJsType, whichTs<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-runon the root against the registry version → root → tag.--dry-runon the root currently fails withfailed 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 theClonebound falls away with it.from_wasm_abireachesthrow_str—into_wasm_abipanics — 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.tsexample predated the current output shape. Both are now what a build actually emits.build_all.shhad noset -e, so a failedwasm-pack buildwas followed by a successfulpopd;compare_output.shskipped any reference whose generated counterpart was missing. Together those two turned a completely failed e2e build into a green run. A generics test also assertedSerNamedTuplewhere it meantDeNamedTuple.Also
tsify = "0.5.5"while demonstratingTs<T>, which does not exist in 0.5.5 or 0.5.6.Tsify::JsTypenow documents the contract the ABI impls already assume: it has to be a#[wasm_bindgen] extern "C"type.🤖 Generated with Claude Code