feat(tauri): add plugin_boxed methods#13837
Merged
Merged
Conversation
Contributor
Package Changes Through 55faa2dThere are 7 changes which include @tauri-apps/cli with patch, tauri-cli with minor, @tauri-apps/api with minor, tauri-runtime-wry with patch, tauri-bundler with patch, tauri with minor, tauri-utils with minor Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
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
previously approved these changes
Jul 17, 2025
Contributor
Legend-Master
left a comment
There was a problem hiding this comment.
Don't mind adding it personally
plugin_dyn methodsplugin_boxed methods
Legend-Master
previously approved these changes
Jul 17, 2025
Contributor
Legend-Master
left a comment
There was a problem hiding this comment.
Will wait for you to sign the commits when you get back 🙃
Legend-Master
approved these changes
Jul 17, 2025
zphrs
pushed a commit
to zphrs/tauri
that referenced
this pull request
Jan 4, 2026
* feat(tauri): add `plugin_dyn` methods * refactor: rename `plugin_dyn` to `plugin_boxed`
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.
Describe the problem
Because this PR is small enough, I didn’t open a feature request issue in advance.
I am implementing the feature to add tauri plugins from Python for pytauri: pytauri/pytauri#220.
In pyo3/pytauri, we cannot use generics, so I store these
TauriPluginasBox<dyn Plugin>.However,
Box<dyn Plugin>itself does not implement thePlugintrait, so I cannot use them inBuilder::pluginandAppHandle::plugin.Describe the solution you'd like
Therefore, I would like to add
plugin_dynmethods to acceptBox<dyn Plugin>instead ofimpl Plugin<R>.Alternatives considered
Alternatively, we could
impl Plugin<R> for Box<dyn Plugin<R>>. But I don't really like this approach, because it would result inBox<Box<dyn Plugin<R>>>.But if tauri doesn't want to add a new API, I can also accept this implementation.