Liking cljdoc? Tell your friends :D

clj-zig.descriptor

The :zig/* and :c/* option language a defnz descriptor and a namespace-level zig-deps carry: parse, validate, and normalize the compile options (C-interop flags, optimize mode, build flags) and the external Zig modules into the option maps the build shell and the content hash consume. Pure: a descriptor map goes in, a validated option or module map comes out, or a diagnostic is thrown.

The `:zig/*` and `:c/*` option language a `defnz` descriptor and a
namespace-level `zig-deps` carry: parse, validate, and normalize the
compile options (C-interop flags, optimize mode, build flags) and the
external Zig modules into the option maps the build shell and the
content hash consume. Pure: a descriptor map goes in, a validated
option or module map comes out, or a diagnostic is thrown.
raw docstring

c-optionsclj

(c-options descriptor)

The C-interop compile options a descriptor's :c/* keys carry, or nil when it carries none. These reach zig build-lib as flags and enter the content hash. Shared by a per-function {:zig/file ...} descriptor and a namespace-level zig-deps.

The C-interop compile options a descriptor's `:c/*` keys carry, or nil
when it carries none. These reach `zig build-lib` as flags and enter the
content hash. Shared by a per-function `{:zig/file ...}` descriptor and a
namespace-level `zig-deps`.
sourceraw docstring

descriptor-optionsclj

(descriptor-options descriptor)

The compile options a descriptor carries: its C-interop flags, its optimize mode, and its Zig build flags (:zig/single-threaded, :zig/pic, :zig/stack-check, :zig/panic-fn). Returns nil when it carries none. Shared by a per-function descriptor and a namespace-level zig-deps, so both paths layer options the same way.

The compile options a descriptor carries: its C-interop flags, its
optimize mode, and its Zig build flags (`:zig/single-threaded`,
`:zig/pic`, `:zig/stack-check`, `:zig/panic-fn`). Returns nil when it
carries none. Shared by a per-function descriptor and a namespace-level
`zig-deps`, so both paths layer options the same way.
sourceraw docstring

optimize-modesclj

The Zig optimize modes a descriptor or zig-deps may name. The keyword form is canonical; it lowers to the string zig build-lib -O takes.

The Zig optimize modes a descriptor or `zig-deps` may name. The keyword
form is canonical; it lowers to the string `zig build-lib -O` takes.
sourceraw docstring

validate-descriptor-keysclj

(validate-descriptor-keys descriptor)

Throw when descriptor carries a :zig/* key outside the curated set (ADR 48). Non-:zig/* keys pass through to Var metadata. Public so the macro expansions call it on the attr-map, body descriptor, and zig-deps.

Throw when `descriptor` carries a `:zig/*` key outside the curated set
(ADR 48). Non-`:zig/*` keys pass through to Var metadata. Public so the
macro expansions call it on the attr-map, body descriptor, and
`zig-deps`.
sourceraw docstring

zig-modulesclj

(zig-modules descriptor)

The external Zig modules a descriptor's :zig/modules declares, normalized and keyed by import name, or nil when it declares none. Each becomes a -M name=<root> module the bodies in the namespace may @import (ADR 34). Shared by a namespace-level zig-deps.

The external Zig modules a descriptor's `:zig/modules` declares,
normalized and keyed by import name, or nil when it declares none. Each
becomes a `-M name=<root>` module the bodies in the namespace may
`@import` (ADR 34). Shared by a namespace-level `zig-deps`.
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