Skip to content

Commit dc0a748

Browse files
committed
Workaround for wasm compile issues.
1 parent 0e4e596 commit dc0a748

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

crates/loadable/src/lib.rs

+11
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,17 @@ pub fn __rust_alloc_error_handler(_: core::alloc::Layout) -> ! {
3737
core::intrinsics::abort()
3838
}
3939

40+
#[cfg(target_family = "wasm")]
41+
#[no_mangle]
42+
static __rust_alloc_error_handler_should_panic: u8 = 0;
43+
44+
#[cfg(target_family = "wasm")]
45+
#[no_mangle]
46+
static _CLOCK_PROCESS_CPUTIME_ID: i32 = 1;
47+
48+
#[cfg(target_family = "wasm")]
49+
#[no_mangle]
50+
static _CLOCK_THREAD_CPUTIME_ID: i32 = 1;
4051

4152
// Not used, but must be defined in some cases. Most notably when using native sqlite3 and loading
4253
// the extension.

0 commit comments

Comments
 (0)