-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
feat: introduce App::run_return
#12668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
lucasfernog
merged 40 commits into
tauri-apps:dev
from
thomaseizinger:feat/introduce-run-return
Mar 16, 2025
Merged
Changes from 35 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
efb3af3
Introduce `run_return`
thomaseizinger fad231a
Fix compile error
thomaseizinger a65ec7f
Clone web_context
thomaseizinger 0ee9182
Refactor to Result API
thomaseizinger 7fced1a
Fix clippy
thomaseizinger 8b9ee81
Impl mock runtime
thomaseizinger baec5c3
Make it desktop-only
thomaseizinger 10efd0b
Add changelog entry
thomaseizinger 8ccee7a
Fix compile error
thomaseizinger f8c6426
Make it semver compatible
thomaseizinger b95c177
Extend changelog entry
thomaseizinger 79aa4b0
Undo semver-hack
thomaseizinger 7e4599f
Reduce diff
thomaseizinger 3f395bf
Remove unnecessary mut
thomaseizinger 4d05665
Make it take `self` by value
thomaseizinger a69b550
Reduce diff
thomaseizinger 9fda2c3
Undo diff hack
thomaseizinger 93cf314
Make everything cfg(desktop)
thomaseizinger 463b7ca
Rename vars to reduce diff
thomaseizinger fad99ed
Fix clippy
thomaseizinger a7acec4
Extract make_event_handler
thomaseizinger 8f06fa7
Reduce diff
thomaseizinger 972d346
Deprecate `App::run_return`
thomaseizinger 0d8d848
Update changelog
thomaseizinger dbb64c1
Fix compile errors
thomaseizinger 0ca7928
Accept reference
thomaseizinger 6885b89
Create event handler first
thomaseizinger 201703a
Update example
thomaseizinger 7d94b41
Update manifest
thomaseizinger 4dfec40
Fix example
thomaseizinger 640db7e
Fix example docs
thomaseizinger 9399241
Call `setup` only upon Ready
thomaseizinger d521c2e
Update changelog entry
thomaseizinger 2e56bc3
Update docs
thomaseizinger e20ac0c
Update changelog
thomaseizinger ba70a4f
Add platform-specific note
thomaseizinger edaac28
update docs
lucasfernog 15002c0
run_return on mobile
lucasfernog 23dd118
Apply suggestions from code review [skip ci]
lucasfernog a2b4412
remove change file [skip ci]
lucasfernog File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| --- | ||
| tauri: 'minor:feat' | ||
| tauri-runtime: 'minor:feat' | ||
| tauri-runtime-wry: 'minor:feat' | ||
| --- | ||
|
|
||
| Add `App::run_return` function. Contrary to `App::run`, this will **not** exit the process but instead return the requested exit-code. This allows the host app to perform further cleanup after Tauri has exited. `App::run_return` is only available on desktop platforms. | ||
|
|
||
| The `App::run_iteration` function is deprecated as part of this because calling it in a loop - as suggested by the name - will cause a busy-loop. | ||
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
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
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
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
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
This file was deleted.
Oops, something went wrong.
thomaseizinger marked this conversation as resolved.
Show resolved
Hide resolved
|
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Run Return Example | ||
|
|
||
| To execute run the following on the root directory of the repository: `cargo run --example run-return`. |
File renamed without changes.
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
2 changes: 1 addition & 1 deletion
2
examples/run-iteration/tauri.conf.json → examples/run-return/tauri.conf.json
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.