Skip to content

Conversation

@WSH032
Copy link
Contributor

@WSH032 WSH032 commented Jul 16, 2025

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 TauriPlugin as Box<dyn Plugin>.

However, Box<dyn Plugin> itself does not implement the Plugin trait, so I cannot use them in Builder::plugin and AppHandle::plugin.

Describe the solution you'd like

Therefore, I would like to add plugin_dyn methods to accept Box<dyn Plugin> instead of impl 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 in Box<Box<dyn Plugin<R>>>.

But if tauri doesn't want to add a new API, I can also accept this implementation.

@WSH032 WSH032 requested a review from a team as a code owner July 16, 2025 16:58
@github-project-automation github-project-automation bot moved this to 📬Proposal in Roadmap Jul 16, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Jul 16, 2025

Package Changes Through 55faa2d

There 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 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.6.0 2.7.0
tauri-utils 2.5.0 2.6.0
tauri-bundler 2.5.0 2.5.1
tauri-runtime 2.7.0 2.7.1
tauri-runtime-wry 2.7.1 2.7.2
tauri-codegen 2.3.0 2.3.1
tauri-macros 2.3.1 2.3.2
tauri-plugin 2.3.0 2.3.1
tauri-build 2.3.0 2.3.1
tauri 2.6.2 2.7.0
@tauri-apps/cli 2.6.2 2.6.3
tauri-cli 2.6.2 2.7.0

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
Legend-Master previously approved these changes Jul 17, 2025
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.

Don't mind adding it personally

@WSH032 WSH032 changed the title feat(tauri): add plugin_dyn methods feat(tauri): add plugin_boxed methods Jul 17, 2025
Legend-Master
Legend-Master previously approved these changes Jul 17, 2025
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.

Will wait for you to sign the commits when you get back 🙃

@FabianLars FabianLars added this to the 2.7 milestone Jul 17, 2025
@Legend-Master Legend-Master merged commit 7f3c989 into tauri-apps:dev Jul 18, 2025
20 checks passed
@github-project-automation github-project-automation bot moved this from 📬Proposal to 🔎 In audit in Roadmap Jul 18, 2025
@WSH032 WSH032 deleted the feat/plugin-dyn branch August 15, 2025 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🔎 In audit

Development

Successfully merging this pull request may close these issues.

3 participants