You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
0.5.8 is what is on crates.io. Everything since has been tests and documentation, so there is nothing waiting for a patch release.
0.6 exists because two pieces of work cannot land without changing output that people already depend on: the enum representation, and how a generated type refers to another one. Both change .d.ts files that consumers compile against, so they go together in one breaking release rather than trickling out.
This is what I think goes in it. @siefkenj — questions for you at the bottom; nothing here is urgent and async is fine.
In scope
Enum output — #77, #79, #80 from @hgiesel. All three have been open since February and all three conflict with main today; the plan is to cut a reviewable stack out of #80, which is the furthest along, rather than merge them in sequence. #77 closes #61. This is also the item that moves the wasm-bindgen floor to 0.2.115: that release fixed skip_typescript not being respected when using reexport, which #80 depends on.
Name resolution — #103. Today a declaration can be renamed and every reference to it keeps emitting the Rust identifier, so tsify emits references to names it never declared. The same gap produces #94 (an affix reaching names it does not own) and #113 (type_params renaming the declaration but not the fields). The mechanism is settled — a trait bound that makes the compiler answer the name question, instead of the macro guessing at it. The scope is not: how much of a program has to carry that bound, and what the escape hatch looks like where it cannot, is still open, and that question gates the design rather than the implementation. #113 is narrow enough to fix on its own first and fold into the shared path later.
The bugs that mislead silently — #112, #113, #115, #116. #115 and #116 are the ones to care about: a type of your own that shares a name with a built-in is rendered as the built-in, which type-checks and is wrong at runtime, and #[declare(rename = ...)] on a type alias is accepted and dropped. Some of these are small enough to ship in a 0.5.x patch instead; none of them needs to wait for the breaking release.
Generic type arguments at the ABI boundary — #76, with #109 and #110 from @TimoLehnertz in review. A generic reaches a function signature without its arguments, so Envelope<Payload> is printed as Envelope, which tsc --strict rejects.
API and packaging — to_ts / to_js as the canonical names with the current ones kept as deprecated aliases, From<tsify::Error> for JsValue so a function can return Result<_, tsify::Error>, a declared rust-version, docs.rs metadata, and the LICENSE files in tsify-macros.
Not in scope
Changing what Ts<T> wraps. It is #[repr(transparent)] over T::JsType, and there is an argument for making it JsValue instead. No one has produced a case where the current form actually breaks, and rebuilding seventeen impls on a maybe is not what a release should carry.
#83js_namespace. Wanted, but it will not hold 0.6 up if the design is not ready.
A tsc --strict --noEmit gate on the e2e output. It cannot go in until genericity struct generate d.ts missing #76 is fixed, because the reference output deliberately records the wrong shape today.
Checking every documented .d.ts.#114 now covers the quickstart; the general mechanism needs nightly rustdoc and stays open.
MSRV. tsify declares none today. Measured rather than remembered: wasm-bindgen 0.2.127 declares rust-version = "1.77", and #109 would put the floor at 1.78 through #[diagnostic::on_unimplemented] — its author has offered to drop that if we would rather not move. Separately, wasm-bindgen-cli declares 1.86, which is a contributor and CI cost rather than something downstream users pay. The question is whether 0.6 declares an MSRV at all, and if so whether it tracks the dependency floor or sits deliberately behind it.
Whether js becomes the default feature. The README has said it will be for some time. 0.6 is the release where that costs nothing extra to announce, or it is a 0.7 question.
namespace versus js_namespace. The existing namespace attribute generates a namespace for enum variants; wasm-bindgen's js_namespace means something else entirely, and #83 wants the latter. One way out is enum_namespace as the recommended name with namespace kept as an alias. That touches a published attribute, so it belongs in a breaking release if it happens at all.
Use a full Typescript AST for generation and printing of types? #81 is also yours — printing through a real TypeScript AST. The name-resolution work above rewrites part of that path. Is 0.6 the release to do the AST change in, so it happens once, or would you rather it stayed separate and landed after?
The breaking bundle — the to_ts / to_js rename, a declared MSRV, js as default. Anything there you would push back on or want out.
0.5.8 is what is on crates.io. Everything since has been tests and documentation, so there is nothing waiting for a patch release.
0.6 exists because two pieces of work cannot land without changing output that people already depend on: the enum representation, and how a generated type refers to another one. Both change
.d.tsfiles that consumers compile against, so they go together in one breaking release rather than trickling out.This is what I think goes in it. @siefkenj — questions for you at the bottom; nothing here is urgent and async is fine.
In scope
Enum output — #77, #79, #80 from @hgiesel. All three have been open since February and all three conflict with
maintoday; the plan is to cut a reviewable stack out of #80, which is the furthest along, rather than merge them in sequence. #77 closes #61. This is also the item that moves the wasm-bindgen floor to 0.2.115: that release fixedskip_typescriptnot being respected when usingreexport, which #80 depends on.Name resolution — #103. Today a declaration can be renamed and every reference to it keeps emitting the Rust identifier, so tsify emits references to names it never declared. The same gap produces #94 (an affix reaching names it does not own) and #113 (
type_paramsrenaming the declaration but not the fields). The mechanism is settled — a trait bound that makes the compiler answer the name question, instead of the macro guessing at it. The scope is not: how much of a program has to carry that bound, and what the escape hatch looks like where it cannot, is still open, and that question gates the design rather than the implementation. #113 is narrow enough to fix on its own first and fold into the shared path later.The bugs that mislead silently — #112, #113, #115, #116. #115 and #116 are the ones to care about: a type of your own that shares a name with a built-in is rendered as the built-in, which type-checks and is wrong at runtime, and
#[declare(rename = ...)]on a type alias is accepted and dropped. Some of these are small enough to ship in a 0.5.x patch instead; none of them needs to wait for the breaking release.Generic type arguments at the ABI boundary — #76, with #109 and #110 from @TimoLehnertz in review. A generic reaches a function signature without its arguments, so
Envelope<Payload>is printed asEnvelope, whichtsc --strictrejects.API and packaging —
to_ts/to_jsas the canonical names with the current ones kept as deprecated aliases,From<tsify::Error> for JsValueso a function can returnResult<_, tsify::Error>, a declaredrust-version, docs.rs metadata, and the LICENSE files intsify-macros.Not in scope
Ts<T>wraps. It is#[repr(transparent)]overT::JsType, and there is an argument for making itJsValueinstead. No one has produced a case where the current form actually breaks, and rebuilding seventeen impls on a maybe is not what a release should carry.js_namespace. Wanted, but it will not hold 0.6 up if the design is not ready.tsc --strict --noEmitgate on the e2e output. It cannot go in until genericity struct generate d.ts missing #76 is fixed, because the reference output deliberately records the wrong shape today..d.ts. #114 now covers the quickstart; the general mechanism needs nightly rustdoc and stays open.Order
Decisions I would rather not make alone
MSRV. tsify declares none today. Measured rather than remembered:
wasm-bindgen0.2.127 declaresrust-version = "1.77", and #109 would put the floor at 1.78 through#[diagnostic::on_unimplemented]— its author has offered to drop that if we would rather not move. Separately,wasm-bindgen-clideclares 1.86, which is a contributor and CI cost rather than something downstream users pay. The question is whether 0.6 declares an MSRV at all, and if so whether it tracks the dependency floor or sits deliberately behind it.Whether
jsbecomes the default feature. The README has said it will be for some time. 0.6 is the release where that costs nothing extra to announce, or it is a 0.7 question.namespaceversusjs_namespace. The existingnamespaceattribute generates a namespace for enum variants; wasm-bindgen'sjs_namespacemeans something else entirely, and #83 wants the latter. One way out isenum_namespaceas the recommended name withnamespacekept as an alias. That touches a published attribute, so it belongs in a breaking release if it happens at all.@siefkenj
Three things where your answer changes what I do, in the order I care about them.
type_aliasargument to prefer them over interfaces #77 adds atype_aliasargument and closes it. Does that shape actually give you what you wanted, or was the issue asking for something the current PR does not cover?to_ts/to_jsrename, a declared MSRV,jsas default. Anything there you would push back on or want out.No rush on any of it.