Can Kotlin be sandboxed?

Be aware that constructing secure, safe sandboxes with the JVM APIs is tricky. It can be done and the JVM provides everything you need, but there’s a lot of different ways to do it and a lot of different ways to screw it up.

You can take a look at this library for ideas: