File tree 5 files changed +71
-0
lines changed
5 files changed +71
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ Here the list of libraries tested:
22
22
| :white_check_mark : | [ amazonica+s3] ( ./amazonica-s3 ) | Cloud API wrapper library | |
23
23
| :white_check_mark : | [ asami] ( ./asami ) | Asami DB | |
24
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 | |
25
26
| :white_check_mark : | [ carmine] ( ./carmine ) | Redis client and message queue for Clojure | |
26
27
| :white_check_mark : | [ cheshire] ( ./cheshire ) | JSON parser/writer | |
27
28
| :white_check_mark : | [ cli4clj] ( ./cli4clj ) | Interactive Command Line Interfaces (CLIs) for Clojure Applications | |
Original file line number Diff line number Diff line change
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
+ /.prepl-port
12
+ .hgignore
13
+ .hg /
14
+ .clj-kondo
15
+ .cache
16
+ .nrepl-port
17
+ output.calva-repl
Original file line number Diff line number Diff line change
1
+ # buffy
2
+
3
+ Testing whether [ clojurewerkz/buffy] ( https://github.com/clojurewerkz/buffy )
4
+ library can be used in a native binary.
5
+
6
+ ## Usage
7
+
8
+ Currently testing:
9
+ ``` clojure
10
+ [clojurewerkz/buffy " 1.1.0" ]
11
+ ```
12
+
13
+ Test with:
14
+ ``` bash
15
+ lein do clean, uberjar, native, run-native
16
+ ```
Original file line number Diff line number Diff line change
1
+ (defproject buffy " 0.1.0-SNAPSHOT"
2
+ :description " FIXME: write description"
3
+ :url " http://example.com/FIXME"
4
+ :license {:name " EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
5
+ :url " https://www.eclipse.org/legal/epl-2.0/" }
6
+ :dependencies [[org.clojure/clojure " 1.10.3" ]
7
+ [clojurewerkz/buffy " 1.1.0" ]]
8
+ :main buffy.core
9
+ :profiles {:uberjar {:aot :all }
10
+ :dev {:plugins [[lein-shell " 0.5.0" ]]}}
11
+
12
+ :aliases
13
+ {" native"
14
+ [" shell"
15
+ " native-image" " --report-unsupported-elements-at-runtime"
16
+ " --initialize-at-build-time" " --no-server"
17
+ " -jar" " ./target/${:uberjar-name:-${:name}-${:version}-standalone.jar}"
18
+ " -H:Name=./target/${:name}" ]
19
+
20
+ " run-native" [" shell" " ./target/${:name}" ]})
Original file line number Diff line number Diff line change
1
+ (ns buffy.core
2
+ (:require [clojurewerkz.buffy.core :as bf])
3
+ (:gen-class ))
4
+
5
+
6
+
7
+ (defn -main
8
+ [& args]
9
+ (let [s (bf/spec
10
+ :hello (bf/string-type 13 )
11
+ :the-answer (bf/int32-type ))
12
+ buf (bf/compose-buffer s)]
13
+ (bf/set-field buf :hello " Hello GraalVM" )
14
+ (prn (bf/get-field buf :hello ))
15
+
16
+ (bf/set-field buf :the-answer 42 )
17
+ (prn (bf/get-field buf :the-answer ))))
You can’t perform that action at this time.
0 commit comments