Skip to content

hyperpolymath/gungir-ssg

License = Gungir-SSG

Static site generator in Odin — data-oriented publishing with predictable performance

Odin MCP Compatible


Why Odin for Static Site Generation?

Content pipelines are inherently data-oriented: parse source files, transform structured data, emit output. Odin’s design philosophy—data-oriented programming with predictable, explicit control—maps directly to this domain.

Data-Oriented Pipelines

Odin provides first-class SOA (Structure of Arrays) data types and array programming primitives. Content processing becomes natural iteration over homogeneous data:

pages: [dynamic]Page
for &page in pages {
    page.html = render(page.content, templates[page.layout])
}

No hidden allocations. No iterator abstractions. Just data flowing through transformations.

Predictable Performance

No garbage collector. No runtime pauses. Memory allocation is explicit and visible:

arena := virtual.arena_init()
defer virtual.arena_destroy(&arena)
allocator := virtual.arena_allocator(&arena)

// All page processing uses arena allocation
// Single deallocation when build completes

Build times scale linearly with content size. What you measure is what you get.

Orthogonal Simplicity

Odin’s context system enables clean customization without global state or macro complexity:

context.allocator = tracking_allocator  // Track all allocations
context.logger = file_logger            // Redirect all logging
build_site(config)                      // No API changes needed

Third-party libraries respect your context. Debugging and profiling require no special builds.

Target Audience

  • Systems programmers seeking a web toolchain that respects their expectations

  • Odin developers wanting practical applications beyond games and graphics

  • Performance engineers who distrust GC pauses in build pipelines

  • Minimalists frustrated by JavaScript SSG dependency graphs

Architecture

gungir-ssg
├── src/
│   ├── parser/       # Markdown, frontmatter, templates
│   ├── transform/    # Content processing, linking
│   ├── emit/         # HTML, RSS, sitemap generation
│   └── main.odin     # CLI and orchestration
├── adapters/         # ReScript MCP adapter bindings
└── templates/        # Default site templates

Quick Start

# Clone the repository
git clone https://github.com/hyperpolymath/gungir-ssg.git
cd gungir-ssg

# Build
odin build src -out:gungir

# Generate a site
./gungir build --source content/ --output dist/

# Development server with live reload
./gungir serve --source content/ --port 8080

Ecosystem Integration

Gungir-SSG operates as a standalone tool with optional MCP integration:

Component Purpose

gungir (this repo)

Core SSG binary in Odin

poly-ssg-mcp

Unified MCP server exposing 28+ SSGs including Gungir

ReScript adapter

Type-safe bindings for MCP tool invocation

The poly-mcp portfolio (hyperpolymath) provides unified interfaces across domains: poly-container-mcp, poly-iac-mcp, poly-k8s-mcp, poly-cloud-mcp, and others. Gungir is the Odin implementation within poly-ssg-mcp.

Licence

PMPL-1.0-or-later — See LICENSE.txt

Copyright © 2025 Jonathan D.A. Jewell

Sponsor this project

Packages

No packages published

Contributors 2

  •  
  •