Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yglukhov/jnim
Nim - Java bridge
https://github.com/yglukhov/jnim
Last synced: 26 days ago
JSON representation
Nim - Java bridge
- Host: GitHub
- URL: https://github.com/yglukhov/jnim
- Owner: yglukhov
- License: mit
- Created: 2015-05-05T19:00:30.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-04-28T17:17:25.000Z (over 1 year ago)
- Last Synced: 2024-08-03T03:08:19.950Z (3 months ago)
- Language: Nim
- Homepage:
- Size: 304 KB
- Stars: 183
- Watchers: 11
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-nim - jnim - Nim - Java bridge. (Development Tools / Binding Generators)
README
jnim - JNI library for Nim language [![Build Status](https://github.com/yglukhov/jnim/workflows/CI/badge.svg?branch=master)](https://github.com/yglukhov/jnim/actions?query=branch%3Amaster) [![nimble](https://raw.githubusercontent.com/yglukhov/nimble-tag/master/nimble.png)](https://github.com/yglukhov/nimble-tag)
======================================Native language integration with Java VM has never been easier!
```nim
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:
* API splitted in two parts: low and high level.
* It supports Java inheritance and generics.The documentation is coming soon. Now you can look the examples in the [tests](tests) directory.
For example, [tests/test_java_lang.nim](tests/test_java_lang.nim) and [tests/test_java_util.nim](tests/test_java_util.nim)
shows how to use high level API.If you want to run the tests, use ``nimble test`` command.
## Installation
```sh
nimble install jnim
```Thanks
-------- The current version of the library is a complete rewrite done by @vegansk.
- Also thanks a lot to all the [contributors](https://github.com/yglukhov/jnim/graphs/contributors)