Weaveback is a literate-programming toolchain written in Rust. Source files are authored as annotated documents (AsciiDoc or Markdown); weaveback expands macro calls and extracts named code chunks to produce final source files.
This page is the top-level navigation hub. Every literate AsciiDoc source in the project is listed below with a short description. Generated HTML pages also carry per-page module cross-reference data (imports, imported-by, public symbols) rendered in the Module cross-references panel at the bottom of each page.
Overview
The two core passes can run independently, or via the split front-end tools:
# Build/tangle directly
wb-tangle source.adoc --gen src/
# Separate passes
weaveback-macro source.adoc --output expanded.adoc
weaveback-tangle expanded.adoc --gen src/
Crate overview
| Crate | Purpose |
|---|---|
Macro expansion engine — lexer, parser, AST, evaluator, scripting back-ends |
|
Noweb chunk extractor, safe file writer, SQLite source-map database |
|
Public command surface: |
|
|
|
Migration plan from direct |
|
Renders all |
|
Shared constants, configuration, and path resolution logic |
|
Language Server Protocol (LSP) client for Rust, Nim, and Python |
|
Literate design and scaffold for the PyO3 + Pydantic agent stack |
Project-level literate sources
These documents generate workspace files and cross-cutting scaffolding outside the main Rust crates.
| Document | Generates |
|---|---|
|
|
|
|
|
|
Cleanup plan for reducing source/generated drift and oversized modules |
|
|
Split CLI literate sources
Planning Notes
Some project constraints and future directions are still exploratory. These notes are meant to preserve them without pretending they are settled.
weaveback-tangle literate sources
Start with weaveback_tangle.adoc
for the module map and error hierarchy, then follow the dependency order:
noweb → safe_writer → db. The CLI main.rs is the thin shell around Clip.
| Document | Generates |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
weaveback-macro literate sources
| Document | Generates |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
evaluator tests index |
|
|
|
|
|
|
weaveback-core literate sources
| Document | Generates |
|---|---|
|
|
|
weaveback-lsp literate sources
| Document | Generates |
|---|---|
|
|
|
weaveback-docgen literate sources
Renders .adoc files to dark-themed HTML with PlantUML diagrams, literate chunk IDs,
and cross-reference panels.
| Document | Generates |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
Project configuration
Root-level project files — workspace manifest, justfile, tangle config, toolchain pin, and editor/IDE settings — all generated from a single literate source.
| Document | Generates |
|---|---|
|
|
|
Packaging and distribution
| Document | Generates |
|---|---|
|
Scripts and UI
| Document | Generates |
|---|---|
|
|
TypeScript/CSS browser UI for the |
Examples
Each example sub-project has a config.adoc capturing its build and tooling files.
| Document | Generates |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
Platform tooling and test fixtures
| Document | Generates |
|---|---|
|
|
|
Architecture and design
New here? Start with why.adoc — the intent, tradeoffs, and design rationale behind every major decision. Then read architecture.adoc for the structural detail.
See architecture.adoc for a detailed discussion of:
-
The literate-programming model and toolchain pipeline
-
Backpropagation (`apply-back`) tool design
-
MCP server interface and agent tools
-
Semantic LSP bridge (Go to Definition, Find References)
-
Macro tracing and the source-map schema
-
Build-system integration (
--depfile,--stamp)