glycerine / zygomys

Zygo is a Lisp interpreter written in 100% Go. Central use case: dynamically compose Go struct trees in a zygo script, then invoke compiled Go functions on those trees. Makes Go reflection easy.
https://github.com/glycerine/zygomys/wiki
BSD 2-Clause "Simplified" License
1.71k stars 81 forks source link

Limiting memory and execution time #53

Closed noonien closed 1 year ago

noonien commented 2 years ago

Is there a way to limit the used memory/stack, and execution time?

I want to use zygomys to provide users of a discord sever the means to run/compose commands via it.

glycerine commented 2 years ago

You could add counters per instructions and limits to stack depth. That would be simple and straightforward. There's nothing for that presently in the code.