diff --git a/crates/wasmtime/src/config.rs b/crates/wasmtime/src/config.rs index 44fe5a009b..ed01ec111c 100644 --- a/crates/wasmtime/src/config.rs +++ b/crates/wasmtime/src/config.rs @@ -449,9 +449,9 @@ impl Config { /// not available. This means epoch-based interruption can only /// serve as a simple external-interruption mechanism. /// - /// An initial deadline can be set before executing code by - /// calling - /// [`Store::set_epoch_deadline`](crate::Store::set_epoch_deadline). + /// An initial deadline must be set before executing code by calling + /// [`Store::set_epoch_deadline`](crate::Store::set_epoch_deadline). If this + /// deadline is not configured then wasm will immediately trap. /// /// ## When to use fuel vs. epochs /// diff --git a/crates/wasmtime/src/store.rs b/crates/wasmtime/src/store.rs index ce33b6042f..a125a49440 100644 --- a/crates/wasmtime/src/store.rs +++ b/crates/wasmtime/src/store.rs @@ -870,6 +870,10 @@ impl Store { /// [`Engine::increment_epoch()`] has been invoked at least /// `ticks_beyond_current` times. /// + /// By default a store will trap immediately with an epoch deadline of 0 + /// (which has always "elapsed"). This method is required to be configured + /// for stores with epochs enabled to some future epoch deadline. + /// /// See documentation on /// [`Config::epoch_interruption()`](crate::Config::epoch_interruption) /// for an introduction to epoch-based interruption. @@ -896,6 +900,10 @@ impl Store { /// finite interval. For deterministic interruption, see the /// "fuel" mechanism instead. /// + /// Note that when this is used it's required to call + /// [`Store::set_epoch_deadline`] or otherwise wasm will always immediately + /// trap. + /// /// See documentation on /// [`Config::epoch_interruption()`](crate::Config::epoch_interruption) /// for an introduction to epoch-based interruption.