In Tauri how can I emit an event to the frontend when I click a menu item

I am new to both Tauri and Rust, I’m trying to emit events to the frontend when certain menu items are clicked

fn main() {

    Builder::default()
        .menu(build_menu())
        .on_menu_event(|event| {
            match event.menu_item_id() {
                "new" => {
                    println!("New fired");
                    // Emit event here
                }
                "save" => {
                    println!("Save fired");
                }
                "open" => {
                    println!("Open fired")
                }
                "export" => {
                    println!("Export fired");
                }
                _ => {}
            }
        })
        .run(generate_context!())
        .expect("error while running tauri application");

}

I’ve been looking at the Tauri documentation a bunch and other SO questions but so far I can only figure out how emit events from setup

Example from tauri.app

fn main() {
  tauri::Builder::default()
    .setup(|app| {
      // `main` here is the window label; it is defined on the window creation or under `tauri.conf.json`
      // the default value is `main`. note that it must be unique
      let main_window = app.get_window("main").unwrap();

      // listen to the `event-name` (emitted on the `main` window)
      let id = main_window.listen("event-name", |event| {
        println!("got window event-name with payload {:?}", event.payload());
      });
      // unlisten to the event using the `id` returned on the `listen` function
      // an `once` API is also exposed on the `Window` struct
      main_window.unlisten(id);

      // emit the `event-name` event to the `main` window
      main_window.emit("event-name", Payload { message: "Tauri is awesome!".into() }).unwrap();
      Ok(())
    })
    .invoke_handler(tauri::generate_handler![init_process])
    .run(tauri::generate_context!())
    .expect("failed to run app");
}