Skip to content

feat(command): implement Drop for CommandChild with kill_on_drop option - #3149

Merged
lucasfernog merged 7 commits into
tauri-apps:v2from
Tunglies:feat-impl-drop-for-commandchild
Oct 16, 2026
Merged

lucasfernog merged 7 commits into
tauri-apps:v2from
Tunglies:feat-impl-drop-for-commandchild

Conversation

@Tunglies

@Tunglies Tunglies commented Dec 5, 2025

Copy link
Copy Markdown
Contributor

Related: #1332, tauri-apps/tauri#14443 tauri-apps/tauri#14360
Not totally resolved for these.

Simplfy impl Drop for CommandChild, only takes effect on tauri-plugin-shell, whether if it is sidecar or normal command. Taks advantage of rust's liftime control. Before the impl, drop has no any operation. Has no any additional external tool usage or invoke helper program. Competiable with tauri dev.

Usage:

let command = app_handle
    .clone()
    .shell()
    .sidecar(EXTERNAL_BIN)?;
command.set_kill_on_drop(true);

@Tunglies
Tunglies requested a review from a team as a code owner December 5, 2025 15:37
@Tunglies

Tunglies commented Dec 5, 2025

Copy link
Copy Markdown
Contributor Author

CC @Legend-Master and @FabianLars

@github-actions

github-actions Bot commented Dec 5, 2025 •

Copy link
Copy Markdown
Contributor

Package Changes Through afc6a20

There are 4 changes which include deep-link with patch, deep-link-js with patch, shell with minor, single-instance with patch

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
api-example 2.0.56 2.0.57
deep-link-example-js 2.2.17 2.2.18
deep-link 2.6.2 2.6.3
deep-link-js 2.6.2 2.6.3
shell 2.5.0 2.6.0
single-instance 2.5.4 2.5.5

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@Legend-Master

Copy link
Copy Markdown
Contributor

I don't mind adding this but it doesn't really sound like something related to the issues/PRs you linked?

@Tunglies

Tunglies commented Dec 7, 2025 •

Copy link
Copy Markdown
Contributor Author

If more complex logic is introduced in the future, using drop(command) will make it easier to extend the data structures. No more external system tool need invoked.

Comment thread .changes/shell-kill-on-drop.md Resolved
@lucasfernog
lucasfernog merged commit 738c323 into tauri-apps:v2 Oct 16, 2026
2 checks passed
@Tunglies
Tunglies deleted the feat-impl-drop-for-commandchild branch October 16, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants