Work around faulty force-link of cabi_realloc

This commit is contained in:
Demetrius Kanios
2026-08-24 21:59:37 -07:00
parent 5fe01c93ec
commit 4aa4d4370b

View File

@@ -190,3 +190,16 @@ pub fn evaluate_license(grace_period_days: u32) -> LicenseStatus {
let checker = LicenseChecker::new(folder);
checker.evaluate_license(meta, grace_period_days)
}
/// Stub for component model `cabi_realloc`
/// Remove me after bytecodealliance/wit-bindgen#1697 makes it to release
#[cfg(not(target_arch = "wasm32"))]
#[unsafe(no_mangle)]
pub extern "C" fn cabi_realloc(
_old_ptr: *mut u8,
_old_len: usize,
_align: usize,
_new_len: usize,
) -> *mut u8 {
panic!("Call to cabi_realloc on native?")
}