{
  "url": "https://unifast.dev/docs/introduction/what-is-unifast/",
  "locale": "en",
  "title": "What is unifast?",
  "description": "unifast is a high-performance Markdown and MDX compiler with a Rust core. Built-in passes for GFM, sanitization, highlighting, and TOC.",
  "section": "introduction",
  "body": "unifast is a high-performance Markdown and MDX compiler with a Rust core. It covers the mainstream use-cases of remark/rehype by implementing features directly as built-in passes - not through JS plugin compatibility.\n\n### Why unifast?\n\nTraditional Markdown toolchains like unified/remark/rehype are powerful but come with trade-offs:\n\n- **Performance overhead** - Multiple JS AST transformations add up, especially at scale.\n- **Plugin coordination** - Ordering, compatibility, and duplication across dozens of plugins.\n- **No built-in features** - Even basic tasks like GFM or sanitization require separate packages.\n\nunifast takes a different approach:\n\n- **Rust core** - Parsing, transformation, and emission all happen in native code.\n- **Built-in passes** - Common features (GFM, sanitization, highlighting, TOC) are built-in, not bolted on.\n- **Single compilation** - One call compiles Markdown to HTML with all features applied.\n\n### Key Features\n\n| Feature | Description |\n|---------|-------------|\n| **CommonMark + GFM** | Tables, task lists, strikethrough, autolinks, footnotes |\n| **Frontmatter** | YAML, TOML, and JSON metadata extraction |\n| **MDX** | JSX expressions and imports in Markdown |\n| **Diagnostics** | Precise error spans with line/column mapping |\n\n### Built-in Passes\n\nCommon remark/rehype plugins are reimplemented as native Rust passes. No npm install, no ordering headaches.\n\n| Pass | Description |\n|------|-------------|\n| **Sanitization** | Schema-based HTML allowlist with safe defaults |\n| **Syntax Highlighting** | Pluggable engines (syntect, Shiki) |\n| **Table of Contents** | Auto-extracted heading tree |\n\n### Platform Support\n\nunifast runs on multiple platforms from a single Rust core:\n\n- **`@unifast/node`** - Node.js binding via N-API (napi-rs). Primary target.\n- **`@unifast/core`** - TypeScript type definitions shared across all packages.\n- **`unifast` (CLI)** - Command-line interface for scripts and CI.\n- **WASM** - Browser and edge runtime support (secondary target).\n\n### Non-goals\n\nunifast is **not** a drop-in replacement for unified. It does not:\n\n- Execute existing remark/rehype JS plugins inside the core.\n- Provide API compatibility with the unified ecosystem.\n- Depend on Node's module resolution in the core compilation path.\n\nInstead, it targets **use-case completeness** - covering what most projects need without the complexity of assembling a plugin pipeline.",
  "alternates": [
    {
      "locale": "en",
      "url": "https://unifast.dev/docs/introduction/what-is-unifast/",
      "api": "https://unifast.dev//api/docs/introduction/what-is-unifast.json"
    },
    {
      "locale": "ja",
      "url": "https://unifast.dev/ja/docs/introduction/what-is-unifast/",
      "api": "https://unifast.dev//api/ja/docs/introduction/what-is-unifast.json"
    },
    {
      "locale": "zh-CN",
      "url": "https://unifast.dev/zh-CN/docs/introduction/what-is-unifast/",
      "api": "https://unifast.dev//api/zh-CN/docs/introduction/what-is-unifast.json"
    },
    {
      "locale": "zh-TW",
      "url": "https://unifast.dev/zh-TW/docs/introduction/what-is-unifast/",
      "api": "https://unifast.dev//api/zh-TW/docs/introduction/what-is-unifast.json"
    },
    {
      "locale": "ko",
      "url": "https://unifast.dev/ko/docs/introduction/what-is-unifast/",
      "api": "https://unifast.dev//api/ko/docs/introduction/what-is-unifast.json"
    },
    {
      "locale": "fr",
      "url": "https://unifast.dev/fr/docs/introduction/what-is-unifast/",
      "api": "https://unifast.dev//api/fr/docs/introduction/what-is-unifast.json"
    },
    {
      "locale": "it",
      "url": "https://unifast.dev/it/docs/introduction/what-is-unifast/",
      "api": "https://unifast.dev//api/it/docs/introduction/what-is-unifast.json"
    },
    {
      "locale": "es",
      "url": "https://unifast.dev/es/docs/introduction/what-is-unifast/",
      "api": "https://unifast.dev//api/es/docs/introduction/what-is-unifast.json"
    },
    {
      "locale": "pt-BR",
      "url": "https://unifast.dev/pt-BR/docs/introduction/what-is-unifast/",
      "api": "https://unifast.dev//api/pt-BR/docs/introduction/what-is-unifast.json"
    },
    {
      "locale": "de",
      "url": "https://unifast.dev/de/docs/introduction/what-is-unifast/",
      "api": "https://unifast.dev//api/de/docs/introduction/what-is-unifast.json"
    },
    {
      "locale": "ru",
      "url": "https://unifast.dev/ru/docs/introduction/what-is-unifast/",
      "api": "https://unifast.dev//api/ru/docs/introduction/what-is-unifast.json"
    },
    {
      "locale": "hi",
      "url": "https://unifast.dev/hi/docs/introduction/what-is-unifast/",
      "api": "https://unifast.dev//api/hi/docs/introduction/what-is-unifast.json"
    },
    {
      "locale": "id",
      "url": "https://unifast.dev/id/docs/introduction/what-is-unifast/",
      "api": "https://unifast.dev//api/id/docs/introduction/what-is-unifast.json"
    },
    {
      "locale": "tr",
      "url": "https://unifast.dev/tr/docs/introduction/what-is-unifast/",
      "api": "https://unifast.dev//api/tr/docs/introduction/what-is-unifast.json"
    },
    {
      "locale": "vi",
      "url": "https://unifast.dev/vi/docs/introduction/what-is-unifast/",
      "api": "https://unifast.dev//api/vi/docs/introduction/what-is-unifast.json"
    }
  ]
}
