kuasar-io / kuasar

A multi-sandbox container runtime that provides cloud-native, all-scenario multiple sandbox container solutions.
https://kuasar.io
Apache License 2.0
1.27k stars 92 forks source link

wasm: add wasmtime support #43

Closed abel-von closed 1 year ago

abel-von commented 1 year ago

support wasmtime as the wasm runtime for webassembly sandbox. it use async feature of wasmtime and launch the instance inside the process, without forking a new process. and the limit of memory is supported by wasmtime ResourceLimiter. the cpu limitation of wasmtime is made by a "fuel" machanism and I am not sure how to make it follow the cpu quota limitation of containers. so cpu limitation is still not supported.