Sandboxed DSL



I’m investigating different technologies to create a DSL that must allow for the runtime and sandboxed execution of dynamic scripts. Kotlin seems to be a very interesting option but I don’t full understand if it can satisfy the “sandbox” part of the requirement. I need to be able to significantly restrict the functionality of the DSL (e.g. no I/O operations, no thread spawning, no use of unauthorized libraries, etc.) while allowing for rich data manipulation features (e.g. or

I would appreciate any type of feedback on the above before I allocate time to understand Kotlin in details .

Thank you in advance.



Kotlin has no provisions for DSL sandboxing at this time. Kotlin supports internal DSLs, and those DSLs have full access to all of the available language and library features.


The JVM has some sandboxing features you can use to get something similar, but they are hard to use.