JetBrains / kotlin-playground

Self-contained component to embed in websites for running Kotlin code
https://jetbrains.github.io/kotlin-playground/examples/
Apache License 2.0
455 stars 81 forks source link

main.kts support #109

Open yschimke opened 3 years ago

yschimke commented 3 years ago

Kotlin scripting is well supported from the command line, also within Intellij (outside source roots).

It would be nice to have main.kts support to run an example like

https://github.com/square/okhttp/blob/3b79fdcba95fefdf0348a91f43aa888aa906db4b/samples/guide/kts/get.main.kts

AlexanderPrendota commented 3 years ago

Hey, thanks for the issue. Very nice feature request. First of all the feature should be implemented on the server-side and then It will work in Kotlin Playground out of the box, I guess.

yschimke commented 3 years ago

Any code pointers, if it's straight forward I could be tempted to try.

AlexanderPrendota commented 3 years ago

=) You are welcome. https://github.com/AlexanderPrendota/kotlin-compiler-server

erokhins commented 3 years ago

cc @ligee @zarechenskiy (just FYI, nothing more)

yschimke commented 3 years ago

=) You are welcome. https://github.com/AlexanderPrendota/kotlin-compiler-server

Please don't consider me blocking if it something that anyone else wants to bash out. Just curious over holidays.