圧倒的に 高速な Markdown コンパイラ

Rust で構築された高性能 Markdown / MDX コンパイラ。
unified より最大 25倍高速

$npm install @unifast/node

ベンチマーク

Markdown から HTML へのコンパイル時間 (ms)。低いほど高速です。

120 lines
0.18ms
4.78ms
27x
560 lines
0.41ms
11.22ms
27x
2,000 lines
1.2ms
31.51ms
26x
unifastunified + remark + rehype

必要な API を、すべて内蔵。

import { compile } from "@unifast/node";

const result = compile("# Hello\n\nThis is **unifast**.");

console.log(result.output);
// <h1 id="hello">Hello</h1>
// <p>This is <strong>unifast</strong>.</p>

特徴

🦀Rust 製

コアコンパイラは Rust で書かれており、ゼロコピーパースとアリーナアロケーションを採用しています。

🔋オールインワン

GFM、数式、絵文字、シンタックスハイライト、frontmatter など 20 以上のプラグインを内蔵。

🌈デュアルハイライトエンジン

Tree-sitter と syntect を内蔵。rehype-highlight より最大 8 倍高速。

⚛️MDX サポート

JSX と式に対応した第一級の MDX コンパイル。

スポンサー