OMNI-CORE LogoOMNI-CORE
omni-mdxomni-3D (soon)Open SourceAbout
GitHubDocumentation
OMNI-CORE

Knowledge must flow freely to shape the future.

Ecosystem

  • omni-mdx
  • omni-3D

Resources

  • Documentation
  • Interactive Playground

Legal & Open Source

  • GitHub Organization
  • Notice

TOAQ GROUP © 2024 - 2026

Released under the MIT License.

Navigation

Getting Started

  • Introduction
    • Web & Next.js
    • Python Engine
    • Build from Source
  • Syntax Guide

Web Integration

  • Next.js Integration
  • Binary AST Transfer
  • Custom Components
  • Unified & Plugins Ecosystem Integration
    • Basic App Router
    • Advanced Rendering
    • Live Client Editor

Python

  • Introduction & Core Engine
    • Basic Parsing & Traversal
    • Advanced Analysis & RAG
    • Native Qt Rendering
    • HTML & Web Rendering
    • Basic Parsing
    • Advanced Analysis
    • HTML Rendering
    • Qt Rendering

Architecture & Core

    • Design Philosophy
    • The Rendering Pipeline
    • Lexing & Tokenization
    • AST Node Design
    • Math & JSX Handling
    • Protocol Specification
    • Zero-Copy Decoding
    • Memory Lifecycle
    • WASM Bindings (Browser)
    • Node.js Native Addons
    • Python Bindings (PyO3)
  • Security
    • Benchmarks
    • Fuzzing Results
Docs
Web Integration
Examples
Basic App Router

Example: Basic App Router

Last Updated March 22, 2026

This example demonstrates the most minimalist integration of Omni-Core within the new Next.js App Router (Next 13+).

ℹ️ Information
Full Source Code: Find this ready-to-clone example on our official sandbox repository: omni-mdx-sandbox/next.

The Concept

In a Server Components (RSC) architecture, the best practice is to let Omni-Core parse the Markdown document on the server, then transmit the generated AST directly to the client for rendering.

This ensures that the heavy parsing workload (executed by our Rust engine) never impacts the end-user’s JavaScript bundle.

Implementation (page.tsx)

Here is what a basic documentation page looks like:

tsx
import { parseMdx, MDXServerRenderer } from '@toaq-oss/omni-mdx/server';
import { MDX_COMPONENTS } from '@/components/mdx-components';

export default async function Page() {
  // 1. Retrieve raw Markdown (from a file, a database, or GitHub)
  const rawMdx = `
# Hello World
Here is some text parsed by **Omni-Core**.
  `;

  // 2. Ultra-fast parsing via the native Rust engine
  const ast = await parseMdx(rawMdx);

  // 3. Native React rendering
  return (
    
); }

To test this locally, simply clone the sandbox and start the development server!

Boosted by omni-mdx native node

On this page

  • The Concept
  • Implementation (page.tsx)
Edit this page on GitHub

Caught a typo or want to improve the docs? Submitting a PR is the best way to help!