3 ms·
Yeah, my comment is actually unironic :) There are a few ways to limit the execution time of wasm programs: - inject code after a set of instructions with a c
by 7373737373 6y ago
Yeah, my comment is actually unironic :)
There are a few ways to limit the execution time of wasm programs:
- inject code after a set of instructions with a certain duration and in each loop that calls an external function which meters and destroys/suspends execution when a limit is reached (e.g. https://github.com/ewasm/wasm-metering https://github.com/ewasm/wasm-metering)
- use a VM which counts instructions (e.g. https://github.com/perlin-network/life https://github.com/perlin-network/life)
- use hardware interrupts
More random thoughts: https://esolangs.org/wiki/RarVM https://esolangs.org/wiki/RarVM