flouthoc opened issue #5059:
Feature
Hi Folks, Thanks for creating this wonderful runtime. I was wondering if there are any plans to expose
wasm-timeout
atc-api
level ?
It will allow users ofc-api
to timout the runtime as per the needs.Benefit
Provides a
timout
knob forc-api
users, giving more control to the end users.Implementation
Maybe creating a top level interface and make timeout part of
wasi_config_t
could 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-timeout
atc-api
level ?
It will allow users ofc-api
to timout the runtime as per the needs.Benefit
Provides a
timout
knob forc-api
users, giving more control to the end users.Implementation
Maybe creating a top level interface and make timeout part of
wasi_config_t
could 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_epoch
andwasmtime_config_epoch_interruption_set
. Another option is possible throughwasmtime_config_consume_fuel_set
andwasmtime_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_epoch
andwasmtime_config_epoch_interruption_set
. Another option is possible throughwasmtime_config_consume_fuel_set
andwasmtime_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: Nov 22 2024 at 16:03 UTC