tauri-plugin-widgets 0.5.0

Tauri plugin for App Widgets on Android, iOS, and macOS (WidgetKit); Windows Widgets Board (Adaptive Cards) + desktop webview; Linux desktop webview with X11 DESKTOP pin.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Emit `guest-js/generated/widget-types.ts` from the Rust SoT template.

use std::env;
use std::fs;
use std::path::PathBuf;
use tauri_plugin_widgets::codegen::emit_widget_types_ts;

fn main() {
    let root = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap());
    let out = root.join("guest-js/generated/widget-types.ts");
    fs::create_dir_all(out.parent().unwrap()).unwrap();
    let ts = emit_widget_types_ts();
    fs::write(&out, ts).expect("write widget-types.ts");
    eprintln!("wrote {}", out.display());
}