tsify
Tsify is a library for generating TypeScript definitions from rust code.
0.5.7
9.0M downloads/mo
#3303 most downloaded on crates.io
madonoharu/tsify
What this package is like to depend on
Last release 3 days ago
20 Aug 2026
Ships unpredictably
gaps range from 9 days to 1.9 years
Rarely documented
notes for 3 of 14 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
14 releases · first in 2022
2 releases in the last 12 months
see the full history below
Release timeline
14 releases · Mar 2022 to Aug 2026Releases
latest 14-
0.5.720 Aug 2026Release notes
Open source →- Release 0.5.7
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's
Clone and its IntoWasmAbi for &Ts 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 [email protected]
- Fix the borrowed-handle leak and correct the release docs
Review of the release candidate turned up a leak in the type whose purpose
is to avoid them: IntoWasmAbi for &Ts 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 [email protected]
- Drop the changelog entry for a never-released fix, match the sample output
The &Ts 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 [email protected]
Co-authored-by: Claude Fable 5 [email protected]
Release notes
Open source →- Added
Ts<T>, a wrapper for#[wasm_bindgen]parameters and return types.#[tsify(from_wasm_abi)]deserializes at the ABI boundary, which cannot report failure, so bad input from JavaScript ends inwasm_bindgen::throw_str— a catchable JS exception that skips destructors, leaking a little on every failure until the instance dies.Ts<T>keeps the boundary infallible and moves the conversion into the function body, where it is an ordinaryResult. Addresses #65, #47 and #86. @cormacrelf contributed #71 - Deprecated
into_wasm_abiandfrom_wasm_abiin favour ofTs<T>.into_wasm_abipanics rather than leaks on failure, but it has the same root cause and the same fix. The attributes still work, and no removal is planned; see the README for details Ts<T>can now be returned fromasync fn. @hgiesel contributed #84#[tsify(namespace)]enums now emitexport type E = E.A | E.Binstead of repeating each variant's shape in the union. @hgiesel contributed #78- Fixed raw string artifacts in doc comments copied into the generated TypeScript. @samkearney contributed the fix
-
0.5.614 Oct 2025Release notes
Open source →- Resolve the issue with default parameters in generics
- @maartendeprez contributed #33, implements type overrides at the container level
-
0.5.513 Apr 2025Release notes
Open source →- Don't assume a struct named
Rangeis automatically aRangetype - Put
#[automatically_derived]onimplblocks - Better handling of
#[serde(skip)] - Bump the
wasm_bindgendep version
- Don't assume a struct named
-
0.4.526 May 2023Nothing published for this version
-
0.4.425 May 2023Nothing published for this version
-
0.4.305 Nov 2022Nothing published for this version
-
0.4.228 Sep 2022Nothing published for this version
-
0.4.118 Sep 2022Nothing published for this version
-
0.4.001 Sep 2022Nothing published for this version
-
0.3.112 Jul 2022Nothing published for this version
-
0.3.022 Jun 2022Nothing published for this version
-
0.2.023 Apr 2022Nothing published for this version
-
0.1.131 Mar 2022Nothing published for this version
-
0.1.029 Mar 2022Nothing published for this version