feat(build): support plugins that are defined in app crate - #8781
Conversation
|
Its DX is weird, but manageable. Do you think we can make the runtime |
|
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 |
|
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 |
|
yeah, it is not horrible, we can ship this |
|
When can I use this feature? |
|
Two months have passed, when can I use this feature? |
|
This feature was released on Februrary 19 in tauri-build beta.2 (3 days after this pr was merged). |
|
Some tips here: [default]
description = """
permissions = ["allow-get_app_setting"]The correct way is to use kebab-case style in permission configuration file, just like this [default]
description = """
permissions = ["allow-get-app-setting"] |
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::pluginfunction, where you can usetauri_build::InlinedPluginto define metadata of the inlined plugin.Ref tauri-apps/plugins-workspace#928