Read what a defnz Var records about its native function. The defining
form leaves inspection data on the Var; these helpers read it back, so
everything a developer asks about a function hangs off its Var:
(zig/source #'add) ;; the Zig body as written
(zig/generated-source #'add) ;; the full wrapper around it
(zig/spec #'add) ;; the normalized boundary spec
(zig/explain #'add) ;; the last failure, rendered
Pure reads of metadata, save for explain, which renders a recorded
diagnostic for a human.
Read what a `defnz` Var records about its native function. The defining
form leaves inspection data on the Var; these helpers read it back, so
everything a developer asks about a function hangs off its Var:
(zig/source #'add) ;; the Zig body as written
(zig/generated-source #'add) ;; the full wrapper around it
(zig/spec #'add) ;; the normalized boundary spec
(zig/explain #'add) ;; the last failure, rendered
Pure reads of metadata, save for `explain`, which renders a recorded
diagnostic for a human.(explain the-var)Render the last failed attempt for the-var as the multi-line string a
developer reads, or nil when there is nothing to explain.
Render the last failed attempt for `the-var` as the multi-line string a developer reads, or nil when there is nothing to explain.
(failed-attempt the-var)The recorded data for the last failed (re)definition, or nil if the current binding is the last attempt.
The recorded data for the last failed (re)definition, or nil if the current binding is the last attempt.
(generated-source the-var)The full Zig wrapper generated around the body.
The full Zig wrapper generated around the body.
(library the-var)The path to the compiled shared library backing the function.
The path to the compiled shared library backing the function.
(signature the-var)The signature vector the function was defined with.
The signature vector the function was defined with.
(source the-var)The Zig body the function was defined with.
The Zig body the function was defined with.
(source-file the-var)The path of the .zig file the body was loaded from, or nil for an
inline body.
The path of the `.zig` file the body was loaded from, or nil for an inline body.
(source-mode the-var)How the body was supplied: inline (:inline), from a complete Zig file
the wrapper calls (:file), or as a raw export fn (:raw).
How the body was supplied: inline (`:inline`), from a complete Zig file the wrapper calls (`:file`), or as a raw export fn (`:raw`).
(spec the-var)The normalized boundary spec the function was built from.
The normalized boundary spec the function was built from.
(status the-var)Whether the backing library was freshly built (:compiled) or reused
from the cache (:cached).
Whether the backing library was freshly built (`:compiled`) or reused from the cache (`:cached`).
(symbol the-var)The stable C symbol the native function is exported under.
The stable C symbol the native function is exported under.
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 |