Skip to content

Commit a306479

Browse files
committed
adding roaring
1 parent 9523108 commit a306479

File tree

6 files changed

+221
-46
lines changed

6 files changed

+221
-46
lines changed

README.md

+47-46
Original file line numberDiff line numberDiff line change
@@ -12,52 +12,53 @@ Here the instructions on how to build your own Clojure projects with GraalVM.
1212

1313
Here the list of libraries tested:
1414

15-
| Status | Library | Description | Remarks |
16-
|:------------------:|------------------------------------------------------|---------------------------------------------------------------------|--------------------------------|
17-
| :white_check_mark: | [Clojure core](./clojure) | Clojure core | |
18-
| :white_check_mark: | [clojure spec](./spec) | Clojure Spec | |
19-
| :white_check_mark: | [clojure/tools.logging](./tools-logging) | Logging library | |
20-
| :white_check_mark: | [clojure/tools.logging+log4j](./tools-logging-log4j) | Logging library | |
21-
| :white_check_mark: | [aleph](./aleph) | Web server | |
22-
| :white_check_mark: | [amazonica+s3](./amazonica-s3) | Cloud API wrapper library | |
23-
| :white_check_mark: | [asami](./asami) | Asami DB | |
24-
| :white_check_mark: | [aws-api+s3](./aws-api-s3) | Cognitect AWS client library | |
25-
| :white_check_mark: | [buffy](./buffy) | Buffy, The Byte Buffer Slayer | |
26-
| :white_check_mark: | [carmine](./carmine) | Redis client and message queue for Clojure | |
27-
| :white_check_mark: | [cheshire](./cheshire) | JSON parser/writer | |
28-
| :white_check_mark: | [cli4clj](./cli4clj) | Interactive Command Line Interfaces (CLIs) for Clojure Applications | |
29-
| :white_check_mark: | [cljfmt](./cljfmt) | Source Formatter | |
30-
| :white_check_mark: | [clj-http-lite](./clj-http-lite) | Web client | |
31-
| :x: | [clj-sophia](./clj-sophia) | A fast RAM-Disk hybrid storage | *Runtime error/JNA* |
32-
| :white_check_mark: | [clj-uuid](./clj-uuid) | RFC4122 Unique Identifiers for Clojure | No objects in namespaced uuids |
33-
| :white_check_mark: | [clara-rules](./clara-rules) | A Clojure forward-chaining rules engine | *Using AOT compiled session* |
34-
| :white_check_mark: | [clostache](./clostache) | {{ mustache }} for Clojure | |
35-
| :white_check_mark: | [component](./component) | Managing lifecycle and dependencies of software | |
36-
| :white_check_mark: | [cprop](./cprop) | Configuration/property management | |
37-
| :white_check_mark: | [datascript](./datascript) | Immutable database and Datalog query engine | |
38-
| :warning: | [fastmath](./fastmath) | Fast and primitive math and stats library | *See README* |
39-
| :white_check_mark: | [fire](./fire) | A lightweight clojure client for Firebase based using the REST API. | |
40-
| :white_check_mark: | [hiccup](./hiccup) | Fast library for rendering HTML in Clojure | |
41-
| :white_check_mark: | [http-kit](./http-kit) | Web server and server | |
42-
| :white_check_mark: | [integrant](./integrant) | Alternative to mount, component etc. | |
43-
| :white_check_mark: | [lacinia](./lacinia) | A GraphQL server implementation in pure Clojure | |
44-
| :white_check_mark: | [loom](./loom) | A Graph manipulation and computation library. | |
45-
| :x: | [monger](./monger) | An idiomatic Clojure MongoDB driver with sane defaults | |
46-
| :white_check_mark: | [μ/log](./mulog) | Event logging system | |
47-
| :white_check_mark: | [next.jdbc + honeysql](./next-jdbc) | Database driver and SQL-in-Clojure | |
48-
| :white_check_mark: | [nippy](./nippy) | Clojure serialization/deserialization library | |
49-
| :white_check_mark: | [pp-grid](./pp-grid) | A text-formatting library | |
50-
| :white_check_mark: | [ring/jetty](./ring-jetty) | Web server | |
51-
| :white_check_mark: | [safely](./safely) | Circuit breaker | |
52-
| :white_check_mark: | [secure-random](./secure-random) | `SecureRandom` initialization | |
53-
| :white_check_mark: | [selmer](./selmer) | A fast, Django inspired template system for Clojure. | |
54-
| :white_check_mark: | [system](./system) | Layer on top of components | |
55-
| :white_check_mark: | [tech.ml.dataset](./tech.ml.dataset) | A Clojure high performance data processing system | |
56-
| :white_check_mark: | [timbre](./timbre) | Pure Clojure/Script logging library | |
57-
| :white_check_mark: | [pedestal](./pedestal) | Pedestal is a sturdy and reliable base for services and APIs. | |
58-
| :white_check_mark: | [claypoole](./claypoole) | Claypoole: Threadpool tools for Clojure | |
59-
| :white_check_mark: | [upit](./upit) | Very very simple library to initialise your app stack. | |
60-
| ::white_check_mark:| [zetasketch](./zetasketch) | Sketch data structures like HLL | requires reflect-config.json |
15+
| Status | Library | Description | Remarks |
16+
|:-------------------:|------------------------------------------------------|---------------------------------------------------------------------|--------------------------------|
17+
| :white_check_mark: | [Clojure core](./clojure) | Clojure core | |
18+
| :white_check_mark: | [clojure spec](./spec) | Clojure Spec | |
19+
| :white_check_mark: | [clojure/tools.logging](./tools-logging) | Logging library | |
20+
| :white_check_mark: | [clojure/tools.logging+log4j](./tools-logging-log4j) | Logging library | |
21+
| :white_check_mark: | [aleph](./aleph) | Web server | |
22+
| :white_check_mark: | [amazonica+s3](./amazonica-s3) | Cloud API wrapper library | |
23+
| :white_check_mark: | [asami](./asami) | Asami DB | |
24+
| :white_check_mark: | [aws-api+s3](./aws-api-s3) | Cognitect AWS client library | |
25+
| :white_check_mark: | [buffy](./buffy) | Buffy, The Byte Buffer Slayer | |
26+
| :white_check_mark: | [carmine](./carmine) | Redis client and message queue for Clojure | |
27+
| :white_check_mark: | [cheshire](./cheshire) | JSON parser/writer | |
28+
| :white_check_mark: | [cli4clj](./cli4clj) | Interactive Command Line Interfaces (CLIs) for Clojure Applications | |
29+
| :white_check_mark: | [cljfmt](./cljfmt) | Source Formatter | |
30+
| :white_check_mark: | [clj-http-lite](./clj-http-lite) | Web client | |
31+
| :x: | [clj-sophia](./clj-sophia) | A fast RAM-Disk hybrid storage | *Runtime error/JNA* |
32+
| :white_check_mark: | [clj-uuid](./clj-uuid) | RFC4122 Unique Identifiers for Clojure | No objects in namespaced uuids |
33+
| :white_check_mark: | [clara-rules](./clara-rules) | A Clojure forward-chaining rules engine | *Using AOT compiled session* |
34+
| :white_check_mark: | [clostache](./clostache) | {{ mustache }} for Clojure | |
35+
| :white_check_mark: | [component](./component) | Managing lifecycle and dependencies of software | |
36+
| :white_check_mark: | [cprop](./cprop) | Configuration/property management | |
37+
| :white_check_mark: | [datascript](./datascript) | Immutable database and Datalog query engine | |
38+
| :warning: | [fastmath](./fastmath) | Fast and primitive math and stats library | *See README* |
39+
| :white_check_mark: | [fire](./fire) | A lightweight clojure client for Firebase based using the REST API. | |
40+
| :white_check_mark: | [hiccup](./hiccup) | Fast library for rendering HTML in Clojure | |
41+
| :white_check_mark: | [http-kit](./http-kit) | Web server and server | |
42+
| :white_check_mark: | [integrant](./integrant) | Alternative to mount, component etc. | |
43+
| :white_check_mark: | [lacinia](./lacinia) | A GraphQL server implementation in pure Clojure | |
44+
| :white_check_mark: | [loom](./loom) | A Graph manipulation and computation library. | |
45+
| :x: | [monger](./monger) | An idiomatic Clojure MongoDB driver with sane defaults | |
46+
| :white_check_mark: | [μ/log](./mulog) | Event logging system | |
47+
| :white_check_mark: | [next.jdbc + honeysql](./next-jdbc) | Database driver and SQL-in-Clojure | |
48+
| :white_check_mark: | [nippy](./nippy) | Clojure serialization/deserialization library | |
49+
| :white_check_mark: | [pp-grid](./pp-grid) | A text-formatting library | |
50+
| :white_check_mark: | [ring/jetty](./ring-jetty) | Web server | |
51+
| :white_check_mark: | [RoaringBitmap](./roaring) | Bitset library | |
52+
| :white_check_mark: | [safely](./safely) | Circuit breaker | |
53+
| :white_check_mark: | [secure-random](./secure-random) | `SecureRandom` initialization | |
54+
| :white_check_mark: | [selmer](./selmer) | A fast, Django inspired template system for Clojure. | |
55+
| :white_check_mark: | [system](./system) | Layer on top of components | |
56+
| :white_check_mark: | [tech.ml.dataset](./tech.ml.dataset) | A Clojure high performance data processing system | |
57+
| :white_check_mark: | [timbre](./timbre) | Pure Clojure/Script logging library | |
58+
| :white_check_mark: | [pedestal](./pedestal) | Pedestal is a sturdy and reliable base for services and APIs. | |
59+
| :white_check_mark: | [claypoole](./claypoole) | Claypoole: Threadpool tools for Clojure | |
60+
| :white_check_mark: | [upit](./upit) | Very very simple library to initialise your app stack. | |
61+
| ::white_check_mark: | [zetasketch](./zetasketch) | Sketch data structures like HLL | requires reflect-config.json |
6162

6263

6364
More libraries to come (*PRs are welcome*).

roaring/.gitignore

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/target
2+
/classes
3+
/checkouts
4+
profiles.clj
5+
pom.xml
6+
pom.xml.asc
7+
*.jar
8+
*.class
9+
/.lein-*
10+
/.nrepl-port
11+
.hgignore
12+
.hg/

roaring/Dockerfile

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# AMD64
2+
FROM ghcr.io/graalvm/native-image:22.3.3@sha256:45af9f40460aba188d27ff3ce9ef56765965af8f6fbcb4c672d7897f2d4b5775
3+
# ARM64
4+
#FROM ghcr.io/graalvm/native-image:22.3.3@sha256:48837ac77ec827dbb76a8fc8c2e82806f180bb68de9039df3af0b5f335c5a7ad
5+
6+
# install leiningen
7+
RUN curl -o /usr/local/bin/lein https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein
8+
RUN chmod a+x /usr/local/bin/lein
9+
10+
# create working directory
11+
RUN mkdir native
12+
WORKDIR /native
13+
14+
# copy project files
15+
COPY . /native
16+
17+
# build uberjar
18+
RUN lein do clean, uberjar
19+
20+
# create native image
21+
RUN lein native
22+
23+
# run normal
24+
RUN lein run
25+
# run native
26+
RUN lein run-native

roaring/README.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Sample-project
2+
3+
Use this project as template for testing a specific library with GraalVM **native-image**
4+
5+
testing: https://roaringbitmap.org/ , some basic operations, serialization and deserialization.
6+
7+
Tested on:
8+
9+
Java version: 20.0.2+9, vendor version: Oracle GraalVM 20.0.2+9.1
10+
Graal compiler: optimization level: b, target machine: compatibility, PGO: off
11+
C compiler: cc (apple, x86_64, 15.0.0)
12+
13+
and
14+
15+
Version info: 'GraalVM 22.3.3 Java 17 CE'
16+
Java version info: '17.0.8+7-jvmci-22.3-b22'
17+
C compiler: gcc (redhat, x86_64, 11.3.1)
18+
19+
## Usage
20+
21+
Currently testing:
22+
23+
[org.roaringbitmap/RoaringBitmap "1.0.0"]
24+
25+
Test with (requires a local GraalVM installation):
26+
27+
lein do clean, uberjar, native, run-native
28+
29+
alternatively use a Dockerized versions:
30+
31+
docker build --progress=plain -t graalvm-test .
32+
33+
34+
Add any info might be useful for the reader.

roaring/project.clj

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
(defproject sample-project "0.1.0-SNAPSHOT"
2+
3+
:dependencies [[org.clojure/clojure "1.11.1"]
4+
[org.roaringbitmap/RoaringBitmap "1.0.0"]
5+
[com.github.clj-easy/graal-build-time "1.0.5"]]
6+
7+
:main simple.main
8+
9+
:uberjar-name "simple-main.jar"
10+
11+
:profiles {:uberjar {:aot :all}
12+
:dev {:plugins [[lein-shell "0.5.0"]]}}
13+
14+
:aliases
15+
{"native"
16+
["shell"
17+
"native-image"
18+
"-Ob"
19+
"-H:+TraceNativeToolUsage"
20+
"-H:+AllowIncompleteClasspath"
21+
"--verbose"
22+
"--no-fallback"
23+
"--report-unsupported-elements-at-runtime"
24+
"--features=clj_easy.graal_build_time.InitClojureClasses"
25+
"--initialize-at-build-time=clojure"
26+
"-H:+ReportExceptionStackTraces"
27+
"-jar" "./target/${:uberjar-name:-${:name}-${:version}-standalone.jar}"
28+
"-H:Name=./target/${:name}"]
29+
30+
"run-native" ["shell" "./target/${:name}"]})

0 commit comments

Comments
 (0)