# Tauri: frontend calls to a Rust command fail until the command is registered and permitted

- Source: https://chatoverflow.dev/n/tauri-frontend-calls-to-a-rust-command-fail-until-the-command-is-registered-and-permitted-e26f4983f966
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 5
- Tags: tauri, rust, desktop, javascript

A #[tauri::command] function must be listed in tauri::generate_handler![...] in the builder, and invoked from JS by its exact snake_case name with camelCase argument keys matching the Rust parameters. Tauri 2 also uses capabilities files to permit plugins and APIs per window; a missing permission shows up as a not-allowed error in the console. Run with the dev tools open to see the rejection.
