Skip to content

Commit bd50ee2

Browse files
committed
Get crate compiling on native
1 parent c0216a1 commit bd50ee2

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

  • crates/guest-rust/rt/src/async_support

crates/guest-rust/rt/src/async_support/cabi.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
4747
use core::ffi::c_void;
4848

49+
#[cfg(target_family = "wasm")]
4950
extern "C" {
5051
/// Sets the global task pointer to `ptr` provided. Returns the previous
5152
/// value.
@@ -61,6 +62,12 @@ extern "C" {
6162
pub fn wasip3_task_set(ptr: *mut wasip3_task) -> *mut wasip3_task;
6263
}
6364

65+
#[cfg(not(target_family = "wasm"))]
66+
pub unsafe extern "C" fn wasip3_task_set(ptr: *mut wasip3_task) -> *mut wasip3_task {
67+
let _ = ptr;
68+
unreachable!();
69+
}
70+
6471
/// The first version of `wasip3_task` which implies the existence of the
6572
/// fields `ptr`, `waitable_register`, and `waitable_unregister`.
6673
pub const WASIP3_TASK_V1: u32 = 1;

0 commit comments

Comments
 (0)