Liking cljdoc? Tell your friends :D
Clojure only.

com.blockether.tree-sitter-language-pack

Auto-resolves the platform-specific native FFI library for com.blockether/tree-sitter-language-pack — the same pattern as Blockether/rift-clojure.

Requiring this namespace selects the right native for the current OS/arch so consumers add a SINGLE dependency (com.blockether/tree-sitter-language-pack) instead of also picking a per-platform native jar by hand.

Resolution order (first hit wins), mirroring rift:

  1. an explicit path — TSLP_NATIVE_PATH env or dev.kreuzberg.treesitterlanguagepack.native.path system property,
  2. a bundled natives/<rid>/<lib> classpath resource (e.g. when the matching …-native-<rid> jar is already on the classpath),
  3. otherwise resolve com.blockether/tree-sitter-language-pack-native-<rid> through Clojure's own dependency machinery (clojure.tools.deps, the same resolver the clojure CLI uses — so your :mvn/repos, mirrors, ~/.m2/settings.xml, and local repository are all honoured), extract the library out of the resolved jar into ~/.cache/clj-tslp, and point NativeLib at it via the system property.

Require this namespace BEFORE using the Java API (dev.kreuzberg.treesitterlanguagepack.TreeSitterLanguagePack), and run the JVM with --enable-native-access=ALL-UNNAMED.

Auto-resolves the platform-specific native FFI library for
com.blockether/tree-sitter-language-pack — the same pattern as
Blockether/rift-clojure.

Requiring this namespace selects the right native for the current OS/arch
so consumers add a SINGLE dependency
(`com.blockether/tree-sitter-language-pack`) instead of also picking a
per-platform native jar by hand.

Resolution order (first hit wins), mirroring rift:

  1. an explicit path — `TSLP_NATIVE_PATH` env or
     `dev.kreuzberg.treesitterlanguagepack.native.path` system property,
  2. a bundled `natives/<rid>/<lib>` classpath resource (e.g. when the
     matching `…-native-<rid>` jar is already on the classpath),
  3. otherwise resolve `com.blockether/tree-sitter-language-pack-native-<rid>`
     through Clojure's own dependency machinery (`clojure.tools.deps`, the
     same resolver the `clojure` CLI uses — so your `:mvn/repos`, mirrors,
     `~/.m2/settings.xml`, and local repository are all honoured), extract the
     library out of the resolved jar into `~/.cache/clj-tslp`, and point
     NativeLib at it via the system property.

Require this namespace BEFORE using the Java API
(dev.kreuzberg.treesitterlanguagepack.TreeSitterLanguagePack), and run the
JVM with `--enable-native-access=ALL-UNNAMED`.
raw docstring

ensure-native!clj

(ensure-native!)

Idempotently make the platform native FFI library available and point NativeLib at it. Returns the resolved library path as a string, or nil when loading is left to NativeLib (explicit override already set, or the native is bundled on the classpath). Safe to call repeatedly.

Idempotently make the platform native FFI library available and point
NativeLib at it. Returns the resolved library path as a string, or nil when
loading is left to NativeLib (explicit override already set, or the native
is bundled on the classpath). Safe to call repeatedly.
sourceraw docstring

ridclj

(rid)

Runtime identifier for this platform, matching NativeLib.resolveNativesRid (e.g. "macos-arm64", "linux-x86_64", "windows-x86_64").

Runtime identifier for this platform, matching NativeLib.resolveNativesRid
(e.g. "macos-arm64", "linux-x86_64", "windows-x86_64").
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