Home

Awesome

jnim - JNI library for Nim language Build Status nimble

Native language integration with Java VM has never been easier!

import jnim

# Import a couple of classes
jclass java.io.PrintStream of JVMObject:
  proc println(s: string)
jclass java.lang.System of JVMObject:
  proc `out`: PrintStream {.prop, final, `static`.}

# Call!
System.`out`.println("This string is printed with System.out.println!")

Overview

The list of the main features:

The documentation is coming soon. Now you can look the examples in the tests directory. For example, tests/test_java_lang.nim and tests/test_java_util.nim shows how to use high level API.

If you want to run the tests, use nimble test command.

Installation

nimble install jnim

Thanks