flouthoc opened issue #5059:
Feature
Hi Folks, Thanks for creating this wonderful runtime. I was wondering if there are any plans to expose
wasm-timeoutatc-apilevel ?
It will allow users ofc-apito timout the runtime as per the needs.Benefit
Provides a
timoutknob forc-apiusers, giving more control to the end users.Implementation
Maybe creating a top level interface and make timeout part of
wasi_config_tcould work ?
flouthoc edited issue #5059:
Feature
Hi Folks,
Thanks for creating this wonderful runtime. I was wondering if there are any plans to expose
wasm-timeoutatc-apilevel ?
It will allow users ofc-apito timout the runtime as per the needs.Benefit
Provides a
timoutknob forc-apiusers, giving more control to the end users.Implementation
Maybe creating a top level interface and make timeout part of
wasi_config_tcould work ?
flouthoc commented on issue #5059:
If can understand that more than enough issues are already there and upstream maintainers are already busy, If the idea looks good I'd like to help by implementing this feature. :smile:
flouthoc edited a comment on issue #5059:
I can understand that more than enough issues are already there and upstream maintainers are already busy, If the idea looks good I'd like to help by implementing this feature. :smile:
alexcrichton commented on issue #5059:
Wasmtime doesn't have a native timeout knob precisely in its embedding API, but the CLI offers a timeout option as built from other primitives in the embedding API. One mechanism for timeouts is epochs which is possible through
wasmtime_engine_increment_epochandwasmtime_config_epoch_interruption_set. Another option is possible throughwasmtime_config_consume_fuel_setandwasmtime_context_add_fuel. Are you able to combine those to satisfy your embedding use case?
flouthoc commented on issue #5059:
Wasmtime doesn't have a native timeout knob precisely in its embedding API, but the CLI offers a timeout option as built from other primitives in the embedding API. One mechanism for timeouts is epochs which is possible through
wasmtime_engine_increment_epochandwasmtime_config_epoch_interruption_set. Another option is possible throughwasmtime_config_consume_fuel_setandwasmtime_context_add_fuel. Are you able to combine those to satisfy your embedding use case?@alexcrichton Thanks a lot for checking this, I'll give it a try today and comment back here :)
Last updated: Dec 06 2025 at 06:05 UTC