Skip to content

Conversation

@seekskyworld
Copy link

@seekskyworld seekskyworld commented Jan 13, 2026

Issue: #14714

Summary:

  • add core app exit command and expose it as JS process.exit
  • remove the leftover Android AppPlugin exit command
  • document app exit permissions and add a change note

Motivation:

  • make the existing exit capability available through the supported API surface

Validation:

  • cargo check -p tauri
  • pnpm -C packages/api ts:check

@seekskyworld seekskyworld requested a review from a team as a code owner January 13, 2026 14:54
@github-project-automation github-project-automation bot moved this to 📬Proposal in Roadmap Jan 13, 2026
@FabianLars
Copy link
Member

FabianLars commented Jan 13, 2026

i feel like you kinda ignored my comments in the linked issue? edit: or maybe not, and perhaps you just missed the last link.

anyway, i'm not opposed to an exit js command but it should be part of the app plugin/module or really anything other than "process" because we already have a process plugin.

@FabianLars
Copy link
Member

cc @whoever-in-the-working-group-cares anyone against having app.exit in js? Then the process plugin can be just for "other" processes than the current one (or both i guess)

@github-actions
Copy link
Contributor

Package Changes Through 4379062

There are 8 changes which include tauri-utils with patch, tauri-build with patch, tauri-cli with patch, @tauri-apps/cli with patch, tauri-runtime-wry with patch, tauri with minor, @tauri-apps/api with minor, tauri-runtime 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
@tauri-apps/api 2.9.1 2.10.0
tauri-utils 2.8.1 2.8.2
tauri-bundler 2.7.5 2.7.6
tauri-runtime 2.9.2 2.9.3
tauri-runtime-wry 2.9.3 2.9.4
tauri-codegen 2.5.2 2.5.3
tauri-macros 2.5.2 2.5.3
tauri-plugin 2.5.2 2.5.3
tauri-build 2.5.3 2.5.4
tauri 2.9.5 2.10.0
@tauri-apps/cli 2.9.6 2.9.7
tauri-cli 2.9.6 2.9.7

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


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

Copy link
Contributor

@Legend-Master Legend-Master left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @whoever-in-the-working-group-cares anyone against having app.exit in js? Then the process plugin can be just for "other" processes than the current one (or both i guess)

Moving exit to core (app) makes a lot of sense to me at least

* @since 2.10.0
*/
async function exit(exitCode?: number): Promise<void> {
const payload = exitCode === undefined ? {} : { exitCode }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could put the default value in the js side? (e.g. { exitCode: exitCode ?? 0 })

*
* @since 2.10.0
*/
async function exit(exitCode?: number): Promise<void> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's move this to app (packages/api/src/app.ts)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 📬Proposal

Development

Successfully merging this pull request may close these issues.

3 participants