From 47f570d5aefc19163e54575c81770c531610e977 Mon Sep 17 00:00:00 2001 From: xqqmdy Date: Fri, 30 Oct 2026 18:57:29 +0800 Subject: [PATCH 1/3] chore: drop redundant references in write! args clippy 1.99 (useless_borrows_in_formatting) denies these under -D warnings; local pre-push CI runs clippy with a newer toolchain than the one that last touched src/ui.rs, so the hook fails on main without this. --- src/ui.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ui.rs b/src/ui.rs index 85df93e..791b65b 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -200,7 +200,7 @@ impl Theme for ConfirmTheme { write!( f, "{} {} ", - &self.base.prompt_prefix, + self.base.prompt_prefix, self.base.prompt_style.apply_to(prompt) )?; } @@ -220,7 +220,7 @@ impl Theme for ConfirmTheme { brackets.apply_to("/"), no, brackets.apply_to("]"), - &self.base.prompt_suffix + self.base.prompt_suffix ), Some(true) => write!( f, @@ -230,7 +230,7 @@ impl Theme for ConfirmTheme { brackets.apply_to("/"), no, brackets.apply_to("]"), - &self.base.prompt_suffix, + self.base.prompt_suffix, self.base.defaults_style.apply_to("yes") ), Some(false) => write!( @@ -241,7 +241,7 @@ impl Theme for ConfirmTheme { brackets.apply_to("/"), no_default, brackets.apply_to("]"), - &self.base.prompt_suffix, + self.base.prompt_suffix, self.base.defaults_style.apply_to("no") ), } From d24a1f79ac824387c8f45175e5a5f1cf9bd00f04 Mon Sep 17 00:00:00 2001 From: xqqmdy Date: Fri, 30 Oct 2026 19:28:58 +0800 Subject: [PATCH 2/3] fix(test): make setup_label assertion color-independent setup_label embeds ANSI styling via tier_token, so asserting on the raw string fails on terminals that force colors (CLICOLOR_FORCE=1), e.g. when the pre-push hook runs cargo test from an interactive shell. Strip the escape codes before asserting. --- src/asr_model.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/asr_model.rs b/src/asr_model.rs index d2a0ad5..f8e18b1 100644 --- a/src/asr_model.rs +++ b/src/asr_model.rs @@ -455,6 +455,8 @@ mod tests { fn large_v3_turbo_is_marked_recommended() { let info = find_model("large-v3-turbo").expect("turbo info"); assert_eq!(info.support_tier, SupportTier::Recommended); - assert!(setup_label(info).contains("[Recommended ]")); + // setup_label embeds ANSI styling (tier_token); strip it so the + // assertion holds on color-forced terminals (CLICOLOR_FORCE=1). + assert!(console::strip_ansi_codes(&setup_label(info)).contains("[Recommended ]")); } } From c46889feb695601d19f739ef76b66711291bc39e Mon Sep 17 00:00:00 2001 From: xqqmdy Date: Fri, 30 Oct 2026 19:53:17 +0800 Subject: [PATCH 3/3] fix(sys): stop regenerating bindings for vulkan builds Vulkan builds forced bindgen at build time (upstream 6a52094) to pick up the ggml_backend_vk_* symbols. That regeneration is untrustworthy on modern libclang: with clang >= 22, bindgen cannot lay out whisper_full_params (nested anonymous structs) and emits an opaque { _address: u8 } stub, corrupting the params ABI passed to whisper_full (known issue, see e.g. meetily#428; clang 23.1.3 reproduces). GitHub CI's ubuntu-latest ships clang 18 and does not hit this, which is why the regeneration path looked healthy there. Instead, bake the ggml_backend_vk_* declarations into the bundled bindings: regenerate src/bindings.rs once with bindgen 0.71.1 + libclang 18.1.1 (instructions in build.rs) and commit it. This keeps upstream's intent (vk symbols available) without any build-time bindgen. The diff vs the previous bundled bindings is limited to the ggml-vulkan additions and glibc 2.44-vs-2.41 header noise (_IO_FILE tail fields, _POSIX_C_SOURCE); no whisper.h structure changed and none of the glibc-touched fields are ever dereferenced. Verified on RADV RDNA4: device enumeration and end-to-end transcription with GPU acceleration. Also allow the rustc 1.99 unnecessary_transmutes lint for the generated bitfield accessors (bindgen 0.71 still emits transmute style; switching to cast_unsigned would raise the toolchain floor above the crate's declared MSRV). --- vendor/whisper-rs-sys/build.rs | 16 ++++++++- vendor/whisper-rs-sys/src/bindings.rs | 48 ++++++++++++++++++++++++--- vendor/whisper-rs-sys/src/lib.rs | 2 ++ 3 files changed, 61 insertions(+), 5 deletions(-) diff --git a/vendor/whisper-rs-sys/build.rs b/vendor/whisper-rs-sys/build.rs index 6acefca..a8604d7 100644 --- a/vendor/whisper-rs-sys/build.rs +++ b/vendor/whisper-rs-sys/build.rs @@ -116,7 +116,21 @@ fn main() { }); } - if env::var("WHISPER_FORCE_GENERATE_BINDINGS").is_ok() || cfg!(feature = "vulkan") { + // Bindgen output is untrustworthy on modern libclang: with clang >= 22 + // (23.1.3 reproduces here), bindgen cannot lay out whisper_full_params + // (nested anonymous structs) and emits an opaque `{ _address: u8 }` stub, + // which corrupts the params ABI passed to whisper_full. See e.g. + // https://github.com/Zackriya-Solutions/meetily/issues/428. The bundled + // bindings (src/bindings.rs) are complete and already include the + // ggml_backend_vk_* symbols from ggml-vulkan.h, so vulkan builds use + // them directly instead of regenerating at build time. + // + // To regenerate the bundled bindings (requires libclang < 22, e.g. 18): + // LIBCLANG_PATH= WHISPER_FORCE_GENERATE_BINDINGS=1 \ + // cargo check --no-default-features --features vulkan + // then copy OUT_DIR/bindings.rs over src/bindings.rs. Verify the diff + // only contains expected header changes. + if env::var("WHISPER_FORCE_GENERATE_BINDINGS").is_ok() { let bindings = bindgen::Builder::default().header("wrapper.h"); #[cfg(feature = "metal")] diff --git a/vendor/whisper-rs-sys/src/bindings.rs b/vendor/whisper-rs-sys/src/bindings.rs index 9f4be14..27bd45a 100644 --- a/vendor/whisper-rs-sys/src/bindings.rs +++ b/vendor/whisper-rs-sys/src/bindings.rs @@ -156,7 +156,7 @@ pub const __USE_ISOC99: u32 = 1; pub const __USE_ISOC95: u32 = 1; pub const __USE_POSIX_IMPLICITLY: u32 = 1; pub const _POSIX_SOURCE: u32 = 1; -pub const _POSIX_C_SOURCE: u32 = 200809; +pub const _POSIX_C_SOURCE: u32 = 202405; pub const __USE_POSIX: u32 = 1; pub const __USE_POSIX2: u32 = 1; pub const __USE_POSIX199309: u32 = 1; @@ -164,6 +164,7 @@ pub const __USE_POSIX199506: u32 = 1; pub const __USE_XOPEN2K: u32 = 1; pub const __USE_XOPEN2K8: u32 = 1; pub const _ATFILE_SOURCE: u32 = 1; +pub const __USE_XOPEN2K24: u32 = 1; pub const __WORDSIZE: u32 = 64; pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1; pub const __SYSCALL_WORDSIZE: u32 = 64; @@ -183,7 +184,7 @@ pub const __STDC_IEC_60559_COMPLEX__: u32 = 201404; pub const __STDC_ISO_10646__: u32 = 201706; pub const __GNU_LIBRARY__: u32 = 6; pub const __GLIBC__: u32 = 2; -pub const __GLIBC_MINOR__: u32 = 41; +pub const __GLIBC_MINOR__: u32 = 44; pub const _SYS_CDEFS_H: u32 = 1; pub const __glibc_c99_flexarr_available: u32 = 1; pub const __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI: u32 = 0; @@ -312,6 +313,8 @@ pub const WHISPER_SAMPLE_RATE: u32 = 16000; pub const WHISPER_N_FFT: u32 = 400; pub const WHISPER_HOP_LENGTH: u32 = 160; pub const WHISPER_CHUNK_SIZE: u32 = 30; +pub const GGML_VK_NAME: &[u8; 7] = b"Vulkan\0"; +pub const GGML_VK_MAX_DEVICES: u32 = 16; pub type wchar_t = ::std::os::raw::c_int; #[repr(C)] #[repr(align(16))] @@ -534,7 +537,9 @@ pub struct _IO_FILE { pub _freeres_buf: *mut ::std::os::raw::c_void, pub _prevchain: *mut *mut _IO_FILE, pub _mode: ::std::os::raw::c_int, - pub _unused2: [::std::os::raw::c_char; 20usize], + pub _unused3: ::std::os::raw::c_int, + pub _total_written: __uint64_t, + pub _unused2: [::std::os::raw::c_char; 8usize], } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { @@ -588,7 +593,10 @@ const _: () = { ["Offset of field: _IO_FILE::_prevchain"] [::std::mem::offset_of!(_IO_FILE, _prevchain) - 184usize]; ["Offset of field: _IO_FILE::_mode"][::std::mem::offset_of!(_IO_FILE, _mode) - 192usize]; - ["Offset of field: _IO_FILE::_unused2"][::std::mem::offset_of!(_IO_FILE, _unused2) - 196usize]; + ["Offset of field: _IO_FILE::_unused3"][::std::mem::offset_of!(_IO_FILE, _unused3) - 196usize]; + ["Offset of field: _IO_FILE::_total_written"] + [::std::mem::offset_of!(_IO_FILE, _total_written) - 200usize]; + ["Offset of field: _IO_FILE::_unused2"][::std::mem::offset_of!(_IO_FILE, _unused2) - 208usize]; }; impl _IO_FILE { #[inline] @@ -5669,6 +5677,38 @@ unsafe extern "C" { i_segment: ::std::os::raw::c_int, ) -> f32; } +unsafe extern "C" { + pub fn ggml_backend_vk_init(dev_num: usize) -> ggml_backend_t; +} +unsafe extern "C" { + pub fn ggml_backend_is_vk(backend: ggml_backend_t) -> bool; +} +unsafe extern "C" { + pub fn ggml_backend_vk_get_device_count() -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn ggml_backend_vk_get_device_description( + device: ::std::os::raw::c_int, + description: *mut ::std::os::raw::c_char, + description_size: usize, + ); +} +unsafe extern "C" { + pub fn ggml_backend_vk_get_device_memory( + device: ::std::os::raw::c_int, + free: *mut usize, + total: *mut usize, + ); +} +unsafe extern "C" { + pub fn ggml_backend_vk_buffer_type(dev_num: usize) -> ggml_backend_buffer_type_t; +} +unsafe extern "C" { + pub fn ggml_backend_vk_host_buffer_type() -> ggml_backend_buffer_type_t; +} +unsafe extern "C" { + pub fn ggml_backend_vk_reg() -> ggml_backend_reg_t; +} pub type __builtin_va_list = [__va_list_tag; 1usize]; #[repr(C)] #[derive(Debug, Copy, Clone)] diff --git a/vendor/whisper-rs-sys/src/lib.rs b/vendor/whisper-rs-sys/src/lib.rs index a38a13a..2d55700 100644 --- a/vendor/whisper-rs-sys/src/lib.rs +++ b/vendor/whisper-rs-sys/src/lib.rs @@ -1,5 +1,7 @@ #![allow(non_upper_case_globals)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] +// rustc 1.99 warns on bindgen's bitfield transmutes; harmless generated code. +#![allow(unnecessary_transmutes)] include!(concat!(env!("OUT_DIR"), "/bindings.rs"));