How to include java deps when compiling idris files #181
-
Hi, i am experimenting with idris-jvm and my next step is make ffi bindings for java libraries. But that example uses idris 1 and there is no type providers for idris2 afaik. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, To provide FFI bindings, Java libraries need not be excluded for compilation. Idris JVM compiler doesn't need any class files or Java classpath to be setup to generate bytecode. It is only at the runtime that the FFI Java dependencies need to be provided. Type Providers in Idris 1 were mainly used to auto generate FFI bindings which required the classes to be in classpath as the types were generated using reflection. In Idris 2, FFI bindings need to be provided explicitly for now so the compiler doesn't need the actual classpath. I just pushed new changes for idris-spring-boot-example to run on Idris 2. If you see here in Maven build file, compiler is invoked only passing |
Beta Was this translation helpful? Give feedback.
Hi,
To provide FFI bindings, Java libraries need not be excluded for compilation. Idris JVM compiler doesn't need any class files or Java classpath to be setup to generate bytecode. It is only at the runtime that the FFI Java dependencies need to be provided. Type Providers in Idris 1 were mainly used to auto generate FFI bindings which required the classes to be in classpath as the types were generated using reflection. In Idris 2, FFI bindings need to be provided explicitly for now so the compiler doesn't need the actual classpath.
I just pushed new changes for idris-spring-boot-example to run on Idris 2. If you see here in Maven build file, compiler is invoked only passing
ipkg
file. T…