Skip to content

Commit 1631dd7

Browse files
committed
use standard project template
1 parent db18319 commit 1631dd7

File tree

3 files changed

+18
-21
lines changed

3 files changed

+18
-21
lines changed

nippy/project.clj

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
:main simple.main
77

88
:uberjar-name "simple-main.jar"
9+
910
:profiles {:uberjar {:aot :all}
1011
:dev {:plugins [[lein-shell "0.5.0"]]}}
1112

secure-random/README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,4 @@ The smallest project possible, which demonstrates the issue with
77

88
## Usage
99

10-
1. Point `[:native-image :graal-bin]` in project.clj to your GRAAL_VM installation.
11-
2. Run `lein native-image`
12-
3. the run `./target/simple-main`
10+
Run `lein do clean, uberjar, native, run-native`

secure-random/project.clj

+16-18
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
(defproject secure-random "0.1.0-SNAPSHOT"
2-
:dependencies [[org.clojure/clojure "1.9.0"]]
3-
:plugins [[io.taylorwood/lein-native-image "0.3.1"]]
4-
:native-image {;; name of output image, optional
5-
:name "simple-main"
6-
;; path to GraalVM home, optional
7-
:graal-bin
8-
"/Library/Java/JavaVirtualMachines/graalvm-ce-java11-20.0.0/Contents/Home/bin"
9-
10-
;; pass-thru args to GraalVM native-image, optional
11-
:opts ["--verbose"
12-
"--no-fallback"
13-
"--enable-all-security-services"
14-
"--initialize-at-build-time"
15-
"-H:+ReportExceptionStackTraces"
16-
"--report-unsupported-elements-at-runtime"]}
2+
:dependencies [[org.clojure/clojure "1.10.1"]]
173

184

195
:main simple.main
206

21-
:profiles {:uberjar {:aot :all
22-
:jvm-opts ["-Dclojure.compiler.direct-linking=true"]}}
23-
:repl-options {:init-ns simple.main})
7+
:uberjar-name "simple-main.jar"
8+
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" "--no-server"
16+
"--initialize-at-build-time"
17+
"-jar" "./target/${:uberjar-name:-${:name}-${:version}-standalone.jar}"
18+
"-H:Name=./target/${:name}"]
19+
20+
"run-native" ["shell" "./target/${:name}"]}
21+
)

0 commit comments

Comments
 (0)