-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
feat(tauri): add plugin_boxed methods
#13837
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
Conversation
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
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't mind adding it personally
plugin_dyn methodsplugin_boxed methods
Legend-Master
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will wait for you to sign the commits when you get back 🙃
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.