Idris 2 support
Closed this issue · 5 comments
This may be premature, but are there plans to continue development of the JVM backend for Idris 2?
I’m happy to help. I believe Idris 2 isn’t yet organized to be as easy to support different backends, at least if the target isn’t a Scheme. =)
Perfect timing! I have already started working on it just a few hours ago. First step is to compile Idris 2 to JVM similar to Blodwen and I hope we can reuse much of what we did with Blodwen for JVM. Once we have that working, then we can add a JVM back end.
An update:
I have got some initial success running Idris 2 on the JVM:
$ java -Xss3m -cp ../idris2jvmout:$IDRIS_JVM_HOME/idris-jvm-runtime.jar main.Main
Welcome to Idris 2 version 0.0. Enjoy yourself!
Main> "Hello Idris 2 on JVM"
"Hello Idris 2 on JVM"
Main> map (* 3) [2, 4 .. 10]
[6, 12, 18, 24, 30]
Main> :q
Bye for now!
Thank you @mattrepl for offering your help. We definitely need more contributions around libraries, build systems etc. On the compiler side especially with codegen back end, it would be great to measure performance and improve wherever possible (reducing boxing, efficient code generation etc.). I got Java Microbenchmark Harness (JMH) working with Idris so after Idris 2, I will also be focusing on performance. On the FFI side, for smoother Java integration, we are mostly there in terms of feature sets (Java lambda support, annotations etc.). We are not sure how type providers would take shape in Idris 2 but we should look to improve calling into Java from Idris.
That's great news! Thanks for providing some ideas of where help would be useful. I'll take some time this week to review what's changed and generally try to get a better feel for the codebase with those issues in mind.
Closing this as we now have an initial release for Idris 2 here. I will keep the Idris 2 JVM fork up to date and will also look to add JVM back end for Idris 2.