Skip to content
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

feat(build): support plugins that are defined in app crate #8781

Merged
merged 2 commits into from Feb 16, 2024

Conversation

lucasfernog
Copy link
Member

Since the plugin permission management is done at the build script, to support inlined plugins we need to change tauri-build to expose such API. This PR adds a new tauri_build::Attributes::plugin function, where you can use tauri_build::InlinedPlugin to define metadata of the inlined plugin.

Ref tauri-apps/plugins-workspace#928

@lucasfernog lucasfernog requested a review from a team as a code owner February 5, 2024 16:43
@amrbashir
Copy link
Member

Its DX is weird, but manageable.

Do you think we can make the runtime Plugin builder allow passing its ACL instead of on the build script?

@lucasfernog
Copy link
Member Author

that would be the ideal approach but currently we validate permissions on the build script and resolve the allowed commands during codegen. so there's no runtime cost and no way to set the permissions at runtime

@lucasfernog
Copy link
Member Author

this PR tries it best to match the behavior between inlined plugins and actual plugin crates. I think it's fine as long as the documentation is good on the website, though I wish the tauri-build entry point was better than tauri_build::build(Attributes::new()).

@amrbashir
Copy link
Member

amrbashir commented Feb 5, 2024

yeah, it is not horrible, we can ship this

@lucasfernog lucasfernog merged commit edb11c1 into dev Feb 16, 2024
20 checks passed
@lucasfernog lucasfernog deleted the feat/inlined-plugins branch February 16, 2024 11:24
@songjiachao
Copy link

When can I use this feature?

@Quietly-20201113
Copy link

Two months have passed, when can I use this feature?

@FabianLars
Copy link
Member

This feature was released on Februrary 19 in tauri-build beta.2 (3 days after this pr was merged).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants