Liking cljdoc? Tell your friends :D

Architecture Decision Records

Decisions made while building clj-zig, newest-numbered last. Each record is one screenful: context, decision, consequences, alternatives. A decision stands until a later record supersedes it by name.

ADR 01-17 are the founding decisions, migrated from the dossier; the design principles they serve remain in ../07-design-principles-and-decisions.md. Later ADRs capture decisions made during development. Written via the record-decision skill.

ADRDecision
01Name the experiment Zigar
02Build clj-zig as a Clojure library, not a new language
03defnz is the primary function form
04Zig-aware defining forms use a z suffix
05Return type lives in the signature vector
06:ret is required and final
07Built-in Zig types are keywords
08Compound types are vector data
09The boundary contract does not model Zig internals
10Start with one-directional interop
11Keep the last good implementation after a compile failure
12Generated artifacts are content-addressed
13Destructuring happens on the Clojure side
14Records require explicit bridge definitions
15Public specs remain ordinary data
16Functional core, imperative shell
17Explicit boundary contracts over data marshalling
18Boundary carriers and the unsigned-return policy
19Error-union boundary semantics
20Enum boundary semantics
21Owned and borrowed slice returns copy into Clojure
22Handles are opaque tagged pointers the caller frees
23Generative and exhaustive testing over the example suite
24Every compiled library links libc
25Rename the project to clj-zig
26A defnz body may be sourced from a Zig file
27Compile options carry C-interop flags
28A Clojure namespace is a Zig namespace
29Multi-file Zig imports copy the import closure into the build
30Bootstrap the Zig toolchain
31Distribute precompiled artifacts, bake the cache
32Generate Zig source, not a lower IR
33Compile out of process, warm the compiler rather than embed it

Can you improve this documentation?Edit on GitHub

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