Locates the bsdkrun binary on the host and caches the result.
Resolution order (first match wins):
set-override!BSDKRUN_BIN environment variablebsdkrun on PATH<repo>/target/release/bsdkrun, then
<repo>/target/debug/bsdkruncandidates and resolve both take an optional opts map
(:override, :bsdkrun-bin, :path, :repo-root) so the discovery logic
is unit-testable without mutating real process/environment state — the JVM
has no supported, portable way to change System/getenv for the current
process, unlike Ruby's ENV[...]=. Any key left out of the map falls back
to the real host state (the override atom, $BSDKRUN_BIN, $PATH, and the
monorepo root inferred from this namespace's own source location).
Locates the `bsdkrun` binary on the host and caches the result.
Resolution order (first match wins):
1. an explicit override set via [[set-override!]]
2. the `BSDKRUN_BIN` environment variable
3. `bsdkrun` on `PATH`
4. an in-repo dev build: `<repo>/target/release/bsdkrun`, then
`<repo>/target/debug/bsdkrun`
[[candidates]] and [[resolve]] both take an optional opts map
(`:override`, `:bsdkrun-bin`, `:path`, `:repo-root`) so the discovery logic
is unit-testable without mutating real process/environment state — the JVM
has no supported, portable way to change `System/getenv` for the current
process, unlike Ruby's `ENV[...]=`. Any key left out of the map falls back
to the real host state (the override atom, `$BSDKRUN_BIN`, `$PATH`, and the
monorepo root inferred from this namespace's own source location).(candidates)(candidates opts)Candidate bsdkrun binary locations, in priority order, as a vector of
path strings. A pure function of opts (see the namespace docstring for
the supported keys and their real-host defaults).
Candidate `bsdkrun` binary locations, in priority order, as a vector of path strings. A pure function of `opts` (see the namespace docstring for the supported keys and their real-host defaults).
(override)The current explicit override, if any.
The current explicit override, if any.
(reset!)Reset cached discovery state and any override (mainly for tests).
Reset cached discovery state and any override (mainly for tests).
(resolve)(resolve opts)Resolve (and cache) the path to the bsdkrun binary.
Throws ex-info (kind :bsdkrun/binary-not-found, see bsdkrun.errors)
listing everything that was searched if nothing matched.
Resolve (and cache) the path to the `bsdkrun` binary. Throws `ex-info` (kind `:bsdkrun/binary-not-found`, see `bsdkrun.errors`) listing everything that was searched if nothing matched.
(set-override! path)Force the SDK to use a specific bsdkrun binary, bypassing discovery.
Force the SDK to use a specific `bsdkrun` binary, bypassing discovery.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |