All Projects → borkdude → clojure-rust-graalvm

borkdude / clojure-rust-graalvm

Licence: EPL-1.0 license
An example of Clojure program calling a Rust library, all combined into one executable using GraalVM.

Programming Languages

rust
11053 projects
clojure
4091 projects
shell
77523 projects
java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to clojure-rust-graalvm

harry-potter-quarkus
Showcases in a web application Quarkus and Infinispan
Stars: ✭ 16 (-85.84%)
Mutual labels:  graalvm, graal-native
quarkus-performance
Comparing the CPU/Memory utilisation - Quarkus via GraalVM Native Image vs. Quarkus via Java Runtime vs. Payara-Micro via Java Runtime.
Stars: ✭ 49 (-56.64%)
Mutual labels:  graalvm, graal-native
azure-native-spring-function
Tutorial on running Spring Boot + GraalVM native images on Azure Functions
Stars: ✭ 56 (-50.44%)
Mutual labels:  graalvm, graal-native
Jfasttext
Java interface for fastText
Stars: ✭ 193 (+70.8%)
Mutual labels:  jni
Inline Java
Haskell/Java interop via inline Java code in Haskell modules.
Stars: ✭ 197 (+74.34%)
Mutual labels:  jni
GraalVMREPL
REPL (read–eval–print loop) shell built on top of JavaFX and GraalVM stack, incorporating GraalJS, GraalPython, TruffleRuby and FastR
Stars: ✭ 31 (-72.57%)
Mutual labels:  graalvm
graalvm-ce-dev-builds
GraalVM Dev Build Downloads
Stars: ✭ 76 (-32.74%)
Mutual labels:  graalvm
Sand
Using JNI to achieve Sobel operator image edge detection使用JNI实现Sobel算子图像边缘检测,支持kotlin https://github.com/Jomes/sand
Stars: ✭ 186 (+64.6%)
Mutual labels:  jni
scala-http4s-realworld-example-app
Example of a RealWorld app backend powered by Scala + http4s
Stars: ✭ 35 (-69.03%)
Mutual labels:  graalvm
ghidraal
A Ghidra extension for scripting with GraalVM languages, including Javascript, Python3, R, and Ruby.
Stars: ✭ 48 (-57.52%)
Mutual labels:  graalvm
Google-Authenticator
Clojure program to compute your google authenticator OTP using TOTP
Stars: ✭ 23 (-79.65%)
Mutual labels:  graalvm
J4rs
Java for Rust
Stars: ✭ 210 (+85.84%)
Mutual labels:  jni
grakkit
A modern JavaScript development environment for Minecraft.
Stars: ✭ 184 (+62.83%)
Mutual labels:  graalvm
Adi
ADI(Android Debug Intensive) 是通过 JVMTI 实现的 Android 应用开发调试的增强工具集,目前主要提供性能相关的监控能力。
Stars: ✭ 194 (+71.68%)
Mutual labels:  jni
mozart-graal
An implementation of Oz on top of Truffle and Graal
Stars: ✭ 37 (-67.26%)
Mutual labels:  graalvm
Xcrash
🔥 xCrash provides the Android app with the ability to capture java crash, native crash and ANR. No root permission or any system permissions are required.
Stars: ✭ 2,689 (+2279.65%)
Mutual labels:  jni
Jxnet
Jxnet is a Java library for capturing and sending custom network packet buffers with no copies. Jxnet wraps a native packet capture library (libpcap/winpcap/npcap) via JNI (Java Native Interface).
Stars: ✭ 26 (-76.99%)
Mutual labels:  jni
Android Disassembler
Disassemble ANY files including .so (NDK, JNI), Windows PE(EXE, DLL, SYS, etc), linux binaries, libraries, and any other files such as pictures, audios, etc(for fun)files on Android. Capstone-based disassembler application on android. 안드로이드 NDK 공유 라이브러리, Windows 바이너리, etc,... 리버싱 앱
Stars: ✭ 250 (+121.24%)
Mutual labels:  jni
Easyincrementalupdate
Android差分补丁库,通过native层合并APK,实现增量更新升级,让你更新的APK更小。
Stars: ✭ 233 (+106.19%)
Mutual labels:  jni
micronaut-camunda-external-client
This open source project allows you to easily integrate Camunda's External Task Clients into Micronaut projects: simply add a dependency in your Micronaut project
Stars: ✭ 19 (-83.19%)
Mutual labels:  graalvm

clojure-rust-graalvm

An example of Clojure program calling a Rust library, all combined into one executable using GraalVM. It gets the amount of free memory via the heim-rs library and prints it in EDN format.

This repo is an adapted example of what is described in the README of the Rust jni library.

In clojure/src-java there is a Java static method which calls a Rust function via JNI. We call this static method from Clojure.

Usage

$ time ./clojure-rust megabyte
{:memory/free [:megabyte "1210"]}
./clojure-rust megabyte   0.01s  user 0.01s system 34% cpu 0.027 total

Accepted options: byte, megabyte, gigabyte.

Build

Prerequisites:

Run script/compile to build the Rust lib, the Clojure uberjar and the GraalVM executable.

Finally, run the executable:

$ target/clojure-rust
{:memory/free [:byte "896126976"]}

License

Copyright © 2020 Michiel Borkent

Distributed under the EPL License, same as Clojure. See LICENSE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].