From 6065835e51134c1a9a876a28f759850c5e10f080 Mon Sep 17 00:00:00 2001 From: Joshua Suskalo Date: Thu, 30 Sep 2021 08:19:00 -0500 Subject: [PATCH] Add section on jvm arguments required --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index b68f514..a900d1b 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,17 @@ library. $ clj -X:deps prep ``` +Coffi requires usage of the module `jdk.incubator.foreign`, which means that the +JVM must enable the usage of this module. In order to use coffi, add the +following JVM arguments to your application. + +```sh +--add-modules=jdk.incubator.foreign --enable-native-access=ALL-UNNAMED +``` + +JVM arguments can be added to your project with -J in the Clojure CLI arguments, +or in the `:jvm-opts` key of an alias in your `deps.edn` file. + Coffi also includes support for the linter clj-kondo. If you use clj-kondo and this library's macros are not linting correctly, you may need to install the config bundled with the library. You can do so with the following shell command: