Target Architecture: Tauri (Rust) + Webview
Status: Request for Comment (RFC)
We do not need another markdown note-taking app. We do not need a word processor that hides complexity behind a "What You See Is What You Get" (WYSIWYG) curtain.
The AsciiDoc Manifesto teaches us that content is data, and markup is structure. The current tooling landscape forces engineers to choose between:
- Generic IDEs (VS Code): Powerful, but agnostic to the specific semantic weight of AsciiDoc.
- Simple Editors: Good for prose, but incapable of handling complex, modular documentation systems.
Gutenberg is proposed as an Integrated Writing Environment (IWE). It treats AsciiDoc not as flat text, but as a directed graph of included files, attributes, and semantic nodes. It prioritizes the writer's flow (UI/UX) while enforcing the rigors of version control and modularity (Engineering).
In compliance with the "Docs-as-Code" philosophy, the source text is the single source of truth.
- No Hiding Markup: We will not use rich-text replacement (e.g., turning
*bold*into just bold text without the asterisks). The user must see the syntax to understand the structure. - Visual Assistance, Not Abstraction: Instead of hiding syntax, we dim it (syntax highlighting) or augment it (badges for attributes), but the raw bytes remain editable.
AsciiDoc shines in its ability to compose documents via include::.
- The Problem: Most editors treat files in isolation.
- The Solution: Gutenberg must parse the entire document tree. If
book.adocincludeschapter1.adoc, the editor must understand the variable scope (attributes) inherited by the child file.
The Rust backend is not merely a file server; it is a Language Server and a State Manager.
-
The Semantic Graph (AST):
- Decision: We will not rely solely on the Ruby
asciidoctorCLI for analysis, as it is too slow for real-time typing feedback. - Implementation: We will implement a lightweight Recursive Descent Parser in Rust that generates a concrete syntax tree (CST).
- Purpose: This allows instant "Go to Definition" for includes, attribute validation, and outline navigation without waiting for a full HTML render.
- Decision: We will not rely solely on the Ruby
-
Git Integration (
git2-rs):- Git operations happen on the Rust thread to avoid freezing the UI.
- Feature: Semantic Diffing. Instead of purely line-based diffs, we can show diffs based on blocks (e.g., "You modified this Admonition Block").
-
Editor Component: usage of Monaco or CodeMirror 6.
- Reasoning: We need accessible APIs for custom decorators (widgets inline with text) to render things like math equations (LaTeX) or color previews without altering the source text.
-
Rendering:
- For the preview pane, we will use
asciidoctor.jsinitially for compatibility, but the architecture must allow swapping this for a Rust-native HTML generator (asciidoc-rs) in the future to achieve sub-millisecond rendering.
- For the preview pane, we will use
The editor must offer "IntelliSense" for prose:
- Attribute Autocompletion: If
{product-version}is defined incomponent.adoc, it should be suggested inpage.adoc. - Broken Link Guard: Real-time checking of image paths and cross-references. Rust checks the filesystem; if the image doesn't exist, the line number is flagged immediately.
- Table Management: ASCII tables are painful to format manually. The editor must auto-format pipe
|alignment upon save.
- Distraction-Free Mode: A toggle to hide the file tree, git status, and preview, leaving only the source text centered.
- Sync-Scrolling: The Preview pane must mathematically align with the Source pane using AST node mapping, not just percentage-based scrolling (which fails when images are present).
- Atomic Commits: A dedicated UI for staging specific lines (hunks).
- Branch Management: Create and switch branches directly from the status bar.
- Conflict Resolution: A 3-way merge view specifically designed for text documents.
Context: Should we write the AsciiDoc processor from scratch in Rust?
- Analysis: Writing a fully compliant AsciiDoc processor is a multi-year effort.
- Verdict: Hybrid Approach.
- Use Rust for the Analysis Layer (Parsing structure, finding references, validating links).
- Use Asciidoctor (JS/Ruby) for the Presentation Layer (Final HTML export).
This gives us the performance of Rust for the typing experience, without losing the feature parity of the official converter.
We are engineers. We write design docs, RFCs, and manuals. The tools we use shape the way we think. If we use tools that treat documentation as second-class citizens, our documentation will reflect that.
We are building Gutenberg to restore dignity to technical writing. We are looking for Rustaceans and Frontend Engineers who understand that a great tool is transparent—it disappears, leaving only the flow between the mind and the screen.
Tech Stack:
- Core: Rust (Tauri v2)
- UI: React/Svelte + Tailwind
- State: Redux or Rust-managed State
- VCS: libgit2