Liking cljdoc? Tell your friends :D
Clojure only.

clj-zig.ffm

Load a compiled library and bind a native symbol through the finalized Foreign Function & Memory API (Java 22+). Imperative shell: it turns a boundary spec into a downcall handle and wraps it in a Clojure fn that coerces scalars across the boundary.

Coercion honors the unsigned-return policy: a value that fits the signed JVM range comes back as a Long; a :u64/:usize value beyond it is promoted to BigInteger, never truncated to a negative. A :void return is nil.

Load a compiled library and bind a native symbol through the finalized
Foreign Function & Memory API (Java 22+). Imperative shell: it
turns a boundary spec into a downcall handle and wraps it in a Clojure
fn that coerces scalars across the boundary.

Coercion honors the unsigned-return policy: a value that fits
the signed JVM range comes back as a `Long`; a `:u64`/`:usize` value
beyond it is promoted to `BigInteger`, never truncated to a negative. A
`:void` return is `nil`.
raw docstring

bindclj

(bind spec library-path)

Load library-path, look up the spec's symbol, and return a Clojure fn that calls it with scalar coercion. The library is held by the global arena for the JVM lifetime; redefinition produces a fresh content-addressed library rather than reloading.

Load `library-path`, look up the spec's symbol, and return a Clojure
fn that calls it with scalar coercion. The library is held by the
global arena for the JVM lifetime; redefinition produces a fresh
content-addressed library rather than reloading.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close