clockworklabs/SpacetimeDB · error · anyhow::Error

procedure_sleep_until is only available in async instances

Error message

procedure_sleep_until is only available in async instances

What it means

Error "procedure_sleep_until is only available in async instances" thrown in clockworklabs/SpacetimeDB.

Source

Thrown at crates/core/src/host/wasmtime/wasmtime_module.rs:130

fn link_sync_stub_for_async_function(
    linker: &mut Linker<WasmInstanceEnv>,
    module: &'static str,
    name: &'static str,
) -> anyhow::Result<()> {
    match name {
        "procedure_sleep_until" => {
            linker.func_wrap(module, name, procedure_sleep_until_sync_stub)?;
        }
        "procedure_http_request" => {
            linker.func_wrap(module, name, procedure_http_request_sync_stub)?;
        }
        _ => anyhow::bail!("missing sync Wasmtime stub for async ABI import `{module}::{name}`"),
    }
    Ok(())
}

fn procedure_sleep_until_sync_stub(_: Caller<'_, WasmInstanceEnv>, _: i64) -> anyhow::Result<i64> {
    anyhow::bail!("procedure_sleep_until is only available in async instances")
}

fn procedure_http_request_sync_stub(
    _: Caller<'_, WasmInstanceEnv>,
    _: u32,
    _: u32,
    _: u32,
    _: u32,
    _: u32,
) -> anyhow::Result<u32> {
    anyhow::bail!("procedure_http_request is only available in async instances")
}

macro_rules! impl_wasmtime_module {
    ($module:ty) => {
        impl module_host_actor::WasmModule for $module {
            type Instance = WasmtimeInstance;
            type InstancePre = Self;

View on GitHub (pinned to 524b4487d9)

When it happens

Trigger: Thrown at crates/core/src/host/wasmtime/wasmtime_module.rs:130 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of clockworklabs/SpacetimeDB@524b4487d9 (2026-08-16). Data as JSON: /api/errors/dd134e16364422b7. Report an issue: GitHub.