[READ-ONLY] Mirror of https://github.com/probablykasper/ferrum. Music library app for Mac, Linux and Windows ferrum.kasper.space
electron linux macos music music-library music-player napi windows
0

Configure Feed

Select the types of activity you want to include in your feed.

Fix specta typegen

Kasper (Mar 5, 2026, 1:28 PM +0100) 674000cc 71af67b2

+24 -10
+2 -1
mobile/package.json
··· 11 11 "build:web": "vite build", 12 12 "lint": "svelte-check --tsconfig ./tsconfig.json && eslint src && prettier --check src", 13 13 "format": "eslint --fix src && prettier --write src", 14 - "tauri": "tauri" 14 + "tauri": "tauri", 15 + "gen-types": "cargo run -p ferrum_mobile --bin export_ts" 15 16 }, 16 17 "license": "MIT", 17 18 "dependencies": {
+5
mobile/src-tauri/src/bin/export_ts.rs
··· 1 + use ferrum_lib::gen_types; 2 + 3 + pub fn main() { 4 + gen_types(); 5 + }
+17 -9
mobile/src-tauri/src/lib.rs
··· 52 52 Ok(tracks) 53 53 } 54 54 55 - #[cfg_attr(mobile, tauri::mobile_entry_point)] 56 - pub fn run() { 57 - #[cfg(target_os = "android")] 58 - android_logger::init_once( 59 - android_logger::Config::default() 60 - .with_max_level(log::LevelFilter::Trace) 61 - .with_tag("{{app.name}}"), 62 - ); 55 + Ok(library_tauri) 56 + } 63 57 58 + pub fn gen_types() -> Builder { 64 59 let specta_builder = tauri_specta::Builder::<tauri::Wry>::new() 65 60 .commands(tauri_specta::collect_commands![error_popup, load_library]); 66 61 ··· 70 65 .export( 71 66 specta_typescript::Typescript::default() 72 67 .bigint(specta_typescript::BigIntExportBehavior::String), 73 - "../bindings.ts", 68 + "./bindings.ts", 74 69 ) 75 70 .expect("Failed to export typescript bindings"); 71 + specta_builder 72 + } 73 + 74 + #[cfg_attr(mobile, tauri::mobile_entry_point)] 75 + pub fn run() { 76 + #[cfg(target_os = "android")] 77 + android_logger::init_once( 78 + android_logger::Config::default() 79 + .with_max_level(log::LevelFilter::Trace) 80 + .with_tag("{{app.name}}"), 81 + ); 82 + 83 + let specta_builder = gen_types(); 76 84 77 85 tauri::Builder::default() 78 86 .plugin(tauri_plugin_fs::init())