Skip to content

Does a Plugin with extend_api in Tauri 2.x have to be a standalone crate? #11285

Answered by FabianLars
suxiaoshao asked this question in Q&A
Discussion options

You must be logged in to vote

You can enable the commands for inline plugins in your app's build.rs file. Something like this (typed in the browser so may not compile):

fn main() {
  tauri_build::try_build(
    tauri_build::Attributes::new()
      .plugin(
        "plugin-name",
        tauri_build::InlinedPlugin::new().default_permission(tauri_build::DefaultPermissionRule::AllowAllCommands)
      )
  ).unwrap();
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by suxiaoshao
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants