Rust Content Processing · Open Source

Compile static pages in microseconds.
Zero unsafe code. Zero telemetry.

An open-source, high-throughput static site generator and content processing pipeline engineered in pure memory-safe Rust. Converts CommonMark + GFM with YAML 1.2 frontmatter and cached Handlebars templates into validated, minified HTML5 in ~28.0 µs per page as both an embeddable crate and standalone CLI.

  • #![forbid(unsafe_code)] Rust Core
  • ~28.0 µs Single-Page Pipeline
  • Library Crate + Standalone CLI
  • ~28.0 µs / Page End-to-end read, Markdown parse, Handlebars render, HTML5 minification, and write.
  • ~4.2 µs Markdown + YAML CommonMark + GFM tables/footnotes (`pulldown-cmark`) and YAML 1.2 frontmatter (`noyalib`).
  • ~12.5 µs Template Render Thread-safe `parking_lot::RwLock` compiled Handlebars template cache with partials and helpers.
  • Zero Unsafe Code Crate-wide `#![forbid(unsafe_code)]`, HTML allowlist sanitization, and path traversal rejection.
High-throughput Rust content pipeline and static site compilation dashboard

Composable Rust Architecture

Embeddable Pipeline for Modern Engineering

Stop maintaining separate Markdown parsers for backend services and monolithic binaries for documentation portals. Share the exact same trait-driven Rust pipeline across your CLI builds, CI/CD jobs, and web microservices.

View Production Workflows

Engine Architecture

Engineered for deterministic safety.

Three-stage trait pipeline combining memory-safe Rust execution, bounded DoS budgets, and dual Apache-2.0 or MIT licensing.

01

ContentProcessor (Stage 1)

Extracts YAML 1.2 frontmatter via noyalib, parses CommonMark + GFM tables, footnotes, and strikethrough via pulldown-cmark, generates semantic TOC navigation, and enforces an explicit HTML tag allowlist.

02

HandlebarsRenderer (Stage 2)

Compiles and caches .hbs templates in a thread-safe parking_lot::RwLock registry. Supports nested partials, custom TemplateHelper implementations, balanced-brace checks, and strict variable validation.

03

HtmlGenerator (Stage 3)

Verifies HTML5 structural tag balance across void and optional-close elements, injects escaped meta tags into head, minifies HTML/CSS/JS in ~8.1 µs via minify-html, and manages static asset caching.

The Processing Pipeline

From Markdown source to minified HTML5.

1

Extract

Validate 10 MB content budgets, sanitize file paths, and parse YAML 1.2 frontmatter into Schema.org JSON-LD metadata.

noyalib 0.0.58 frontmatter engine
2

Parse

Transform CommonMark + GFM tables, footnotes, and strikethrough into sanitized HTML with automated Table of Contents.

~4.2 µs pulldown-cmark 0.13.5
3

Render

Evaluate compiled .hbs Handlebars layouts, partials, and custom helpers from the concurrent RwLock cache.

~12.5 µs handlebars 6.2 render
4

Minify

Verify HTML5 tag balance, inject escaped meta tags, and collapse HTML, inline CSS, and JS whitespace.

~8.1 µs minify-html 0.18.1
London architectural skyline at night representing high-assurance Rust infrastructure

High-Performance Pipeline

Deterministic Execution at Enterprise Scale

Engineered for documentation portals and backend services requiring bounded memory budgets, lock-free read concurrency, and zero unsafe blocks.

View Architecture Blueprint

Developer Quickstart

Install via Cargo, Homebrew, or Nix in Seconds

Run as a standalone CLI binary to scaffold, build, and live-serve static sites, or add the crate to your Cargo.toml to embed the pipeline in Rust.

bash - nucleusflow
# 1. Install standalone CLI and Rust crate (v0.0.11)
$cargo install nucleusflow --locked
$nucleusflow new docs-portal --template docs
# 2. Compile CommonMark + Handlebars with HTML5 minification
$nucleusflow build --content-dir content --output-dir public --minify
# 3. Deterministic pipeline output (~28.0 µs / page)
{ "status": "COMPLETED", "latency_us": 28.0, "unsafe_blocks": 0 }

Defense-in-Depth Security

Memory-safe Rust with strict input boundaries.

NucleusFlow enforces #![forbid(unsafe_code)] across every module (ADR-0001), rejects path traversal via property-tested sanitize_path (ADR-0003), sanitizes HTML against an explicit tag allowlist, and caps input budgets with zero outbound network calls.

Read Security Architecture

Clear Answers

Frequently Asked Questions

Can I use NucleusFlow as a Rust library as well as a CLI binary?

Yes. Unlike monolithic static site binaries such as Hugo or Zola, NucleusFlow is published on Crates.io as both a library crate (nucleusflow) and a standalone CLI binary. You can embed ContentProcessor, HandlebarsRenderer, HtmlGenerator, or the NucleusFlow orchestrator directly inside your Rust services.

Which Markdown, frontmatter, and template formats are supported?

NucleusFlow parses CommonMark plus GitHub Flavored Markdown (tables, footnotes, strikethrough) via pulldown-cmark 0.13.5, extracts YAML 1.2 frontmatter via noyalib 0.0.58, compiles Handlebars (.hbs) templates via handlebars 6.2, and minifies HTML5 via minify-html 0.18.1.

What is the Minimum Supported Rust Version (MSRV)?

NucleusFlow requires Rust 1.89.0 or newer (2021 Edition). This floor is enforced at compile time via Cargo.toml and build.rs and verified in CI.

Is NucleusFlow open source and available for commercial use?

Yes. NucleusFlow is dual-licensed under the Apache-2.0 and MIT open-source licenses, allowing commercial and open-source embedding without copyleft restrictions.

Developer Quickstart

Content pipelines are core infrastructure.
Yours should be memory-safe and instant.

Get started in minutes with the Rust library crate or CLI binary across Linux, macOS, and Windows.

Install NucleusFlow