This project generates a native binary image of a simple program using lacinia, a GraphQL server implementation in pure Clojure
Configure with:
make deps
Re-run this step after changing any project dependencies.
The simple.schema
class reads files from disk, so native-image
must
be run with the -H:ResourceConfigurationFiles
option set to
clinit.d/resource-config.json
(as project.clj
should be doing already).
More information here.
Test with:
make
The program will print the results of a simple GraphQL query.
simple.main
[com.walmartlabs.lacinia :as lacinia]
✅
simple.schema
[com.walmartlabs.lacinia.util :as util]
✅[com.walmartlabs.lacinia.schema :as schema]
✅
-
a GraalVM SDK from the 21.x or later series, targeting Java 11 or later, is required
-
clojure
1.10.1 (and older) is affected by this known issue; the minimum required version is 1.10.2 -
some unidentified transitive dependency is calling into the Java UI widget libraries, so:
-
Linux targets will need the FreeType 2 development package, in addition to the required build dependencies
-
expect a fat binary (~70 Mb on a Linux desktop, or ~55 Mb on Windows)
-