wolf-book Public
trunk
Code
Use Git or checkout with SVN using the web URL.
No matching headings.
The Wolf Book
The wolf language text. The web edition at lupp.us
is canonical and is set to look like a printed page. The single-file
markdown and the PDF are rendered from the same source.
principles/DESIGN.md is the binding design document.
30 of the 34 chapters are written. Chapter 29 is reserved whole,
because it needs Pool and handle to execute on one lane, and says
so on its own page. Chapters 13, 21, 23 and 25 each reserve sections
for the same kind of reason. Chapters 33 and 34 are the newest and sit
at the end of part 4 with numbers out of order: section numbers are
permanent anchors, so a late chapter takes the next free number instead
of renumbering thirty others (principles/TOC.md §Deltas).
Code samples are GPL-3.0-or-later with the wolf Runtime Library Exception, matching the runtime, so code you take from this book into your programs is yours. The prose license is proposed as CC BY 4.0 and is not settled. The wolf Training Data Permission lets you train models on this repository's text and ship excerpts of it in datasets under CC BY 4.0.
The toolchain
Everything runs through cargo.
cargo xtask samplesextracts and executes every code sample: the exercise programs underprinciples/exercises/and every fenced wolf block inbook/, against the pinned tools inwolf-toolchain.toml. Every```consoleblock whose commands are all pinned tools is replayed against the program printed above it, and the pasted output is byte-compared. A block that needs a shell is reported as skipped, with its name. Diagnostics fromfail(…)samples are snapshot-checked undersnapshots/.samples-pending.tomllists the samples whose directives are waiting on a named feature; a pass there is reported as a flip, so a feature that lands gets noticed.--self-testchecks that the rig catches deliberately broken samples.--blessupdates snapshots for review.cargo xtask contrastcompiles and runs the other-language code the book quotes (samples/contrast/), with warnings denied, and checks that every```rustblock inbook/appears there verbatim.cargo xtask backmatter [--check]regenerates the two generated pages: Appendix A from the pinned spec'sgrammar.ebnf, and the Solutions page from the exercise corpus.--checkfails on drift and also comparesvendor/spec/against a sibling wolf-lang checkout.cargo xtask grammar-syncre-vendors the wolf tmLanguage grammars from wolf-lsp at the pin intohighlight/and regenerates the highlight stylesheet (theme/highlight.css).--checkfails on drift. Highlighting happens at build time in the preprocessor, and highlight.js ships as an empty file on purpose.cargo xtask render [web|md|pdf|all]produces the three artifacts: the mdBook web edition (target/render/web/, with a full custom theme and section-number anchors like#8.4),target/render/wolf-book.md, andtarget/render/wolf-book.pdfvia typst (XCharter and Source Code Pro, same palette as the web). A missing typst is reported as a skip;--require-pdfmakes it an error, which is how CI runs it.cargo xtask verify-docschecks the book's factual claims: corpus counts, pin well-formedness, TOC-to-chapter numbering, line-count claims, clause tags and diagnostic codes againstvendor/spec/, a published solution for every printed exercise, and the tense conventions inprinciples/TONE.md.
Every code block in the book is executed by CI.
Layout
book/ (SUMMARY, front matter, the chapters, back matter) · theme/
(the mdBook theme replacement) · highlight/ (vendored grammars, edited
only upstream) · vendor/spec/ (the pinned spec's grammar, clause
anchors and diagnostic-code list) · print/ (PDF fonts) · xtask/ (the
pipeline) · principles/ (TONE.md, TOC.md, EXERCISES.md and the
exercise corpus, DESIGN.md, INTERACTIVITY.md, TWO-MACHINES.md) ·
docs/ (the reviewer
checklist, the errata policy, the standing prose audit) · STYLE.md
(mechanics) · PRINT.md (the typst decision) · PERMISSIONS.md (the
lyric-quotation ledger).