Repository navigation
Conversation
Owner
colbymchenry
added a commit
that referenced
this pull request
Oct 31, 2026
…hat answers (#3129) A Tauri app is two programs in one window: the page calls invoke('save_file') and a Rust #[tauri::command] answers, and neither names the other. callers on a command came back empty even when the whole frontend used it, and a flow stopped at the wire. A new synthesis pass, tauri-synthesizer.ts, pairs the literals. tauri-command links the function a call is written in to the Rust function a handler list registers, with registeredAt at the list. It reads invoke imported, aliased, through a namespace, dynamically and off the global API; a project's own functions that hand their first parameter to invoke; and tauri-specta's commands.fooBar(), which reaches an indexed bindings.ts on its own and is read by its camelCase name when bindings.ts is not in the index. tauri-event links an emit to its listeners in either language, and a listener to the struct deriving tauri-specta's Event. Registration means a generate_handler! or collect_commands! list in code, not only one handed straight to tauri::Builder::default(): clash-verge-rev registers through tauri_specta's builder, and Cmdr's list is built by a macro, so there the app's declared commands answer. A name a list holds once can be one function per platform, and all of them link. Apps are scoped by folder, plugins by name, and a tie links nothing. Reimplements PR #878 by @vdavid, folding in PR #2524 by @nk33-dev. Validation: A/B against main on pot-desktop (+37 edges), clash-verge-rev (+93), Cmdr (+1,318 on a 1,588-file subtree), GitButler (+33), Yaak (+6) and tauri-specta's examples (+99), none removed, every class triaged. 611 of Cmdr's 630 commands now have a frontend caller. lightningcss, express and ripgrep are byte-identical. The pass costs 2 ms on a Rust + JS project with no Tauri, 153 ms on clash-verge-rev. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
|
Thanks @nk33-dev, your registration check, call-site edges with |
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.
Problem
The existing Tauri decorator recognition keeps command functions from being reported as dead code, but it does not connect a frontend
invoke("command")to the Rust handler. That leaves a cross-language call-path gap.Changes
src-tauri/srcapps.tauri::Builder::default().invoke_handler(tauri::generate_handler![...]). This follows the documented command registration.Validation
Windows / Node 24, upstream baseline
7ba8eee4:npx tsc --noEmit: passed.git diff --check: passed.Review Status / Limits
Draft: required small/medium/large real-repo probes and Sonnet agent A/B have not been run; fixture success is not full framework validation. No full test suite was run.
This does not model global Tauri access, wrappers/re-exports, aliased Rust macros, builder variables, nonstandard crate/module layouts or Vue/Svelte script extraction. Registration is source evidence, not a runtime permission/reachability claim. No schema, extraction or kernel changes.