Skip to main content

Crate quillmark_core

Crate quillmark_core 

Source
Expand description

§Quillmark Core Overview

Core types and functionality for the Quillmark format-first Markdown rendering system.

§Features

This crate provides the foundational types and traits for Quillmark:

  • Parsing: card-yaml block extraction (~~~ metadata blocks)
  • Format model: Quill type for managing format bundles with in-memory file system
  • Backend trait: Extensible interface for implementing output format backends
  • Error handling: Structured diagnostics with source location tracking
  • Utilities: TOML⇄YAML conversion helpers

§Quick Start

use quillmark_core::Document;

// Parse markdown with a card-yaml metadata block
let markdown = "~~~\n$quill: my_quill\n$kind: main\ntitle: Example\n~~~\n\n# Content";
let doc = Document::from_markdown(markdown).unwrap();
let title = doc.main()
    .payload()
    .get("title")
    .and_then(|v| v.as_str())
    .unwrap_or("Untitled");
assert_eq!(title, "Example");

§Architecture

The crate is organized into modules:

  • document: Markdown parsing with card-yaml block support
  • backend: Backend trait for output format implementations
  • error: Structured error handling and diagnostics
  • types: Core rendering types (OutputFormat, Artifact, RenderOptions)
  • quill: Quill bundle and related types

§Further Reading

Re-exports§

pub use document::Card;
pub use document::CardWire;
pub use document::Document;
pub use document::EditError;
pub use document::ParseOutput;
pub use document::Payload;
pub use document::PayloadItem;
pub use document::PayloadItemWire;
pub use document::SeedOverlay;
pub use document::WireError;
pub use backend::Backend;
pub use error::Diagnostic;
pub use error::Location;
pub use error::ParseError;
pub use error::RenderError;
pub use error::RenderResult;
pub use error::Severity;
pub use types::Artifact;
pub use types::OutputFormat;
pub use types::RenderOptions;
pub use session::RenderSession;
pub use quill::zero_value;
pub use quill::FileTreeNode;
pub use quill::Quill;
pub use quill::QuillIgnore;
pub use quill::STANDARD_METADATA_KEYS;
pub use value::json_depth_exceeds;
pub use value::PathSegment;
pub use value::QuillValue;
pub use version::quill_ref_hint;
pub use version::QuillReference;
pub use version::Version;
pub use version::VersionSelector;

Modules§

backend
Backend trait for output backends.
document
Parsing and typed in-memory model for Quillmark card-yaml documents.
error
Error Handling
normalize
Input Normalization
quill
The Quill type — portable, validated quill data.
session
types
Core types for rendering and output formats.
value
Value type for unified representation of TOML/YAML/JSON values.
version
Version Management