Nim used on small devices, I was wondering if it's possible to use it as a safe sandbox?
Is it possible to compile and execute unsafe Nim code, with limits:
P.S.
It's possible to make Nim safe by compiling it to JS and running on Deno (which is safe). But, it's much more heavy, and while Deno is safe, it doesn't have CPU/Memory/Time limits.
Also, I think it's possible to do all these things in Docker container. But maybe Nim also can do all that?
If the code is not trusted, you would need to sandbox the compiler as it can read/write/delete arbitrary files at compile time (even when compiling to JS for Deno) I think.
Probably some container system is the best option.