cargo doc for JavaScript
Rust-powered document generator and high-performance Markdown toolkit
Documentation • Getting Started • Playground
Note
Ox Content is an independent personal project by ubugeeei. It is not an official VoidZero project, product, or endorsement. The current branding is an intentional homage to the VoidZero ecosystem because I care a lot about that design direction and hope I can contribute more directly in the future. If VoidZero or the relevant rights holders would prefer that I stop using this branding direction, I will change it.
- Blazing Fast - Arena-allocated parser with zero-copy parsing
- mdast Compatible - Full compatibility with the unified ecosystem
- GFM Support - Tables, task lists, strikethrough, autolinks, footnotes
- Multi-Runtime - Node.js (NAPI), WebAssembly, Native Rust
- Framework Agnostic - Works with Vue, React, Svelte, and more
- Built-in SSG - Static site generation with theming, search, and OG images
- API Docs Generation - Generate docs from JSDoc/TypeScript (like
cargo doc) - i18n - ICU MessageFormat 2 parser, dictionary management, static checker, and LSP
- Editor Tooling - Markdown/MDC LSP plus VS Code, Zed, and Neovim integrations
npm install @ox-content/napiimport { parseAndRender } from "@ox-content/napi";
const { html } = parseAndRender("# Hello World", { gfm: true });npm install @ox-content/vite-plugin@ox-content/vite-plugin already installs the native @ox-content/napi dependency it needs.
// vite.config.ts
import { defineConfig } from "vite";
import { oxContent } from "@ox-content/vite-plugin";
export default defineConfig({
plugins: [
oxContent({
srcDir: "docs",
outDir: "dist/docs",
highlight: true,
ssg: {
siteName: "My Docs",
},
}),
],
});npm install @ox-content/wasmimport init, { parseAndRender, WasmParserOptions } from "@ox-content/wasm";
await init();
const options = new WasmParserOptions();
options.gfm = true;
options.tables = true;
options.taskLists = true;
const result = parseAndRender("# Hello from WASM", options);
console.log(result.html);# Vue
npm install @ox-content/vite-plugin-vue
# React
npm install @ox-content/vite-plugin-react
# Svelte
npm install @ox-content/vite-plugin-svelte# Check for missing/unused translation keys
ox-content-i18n check --dict-dir content/i18n --src src
# Validate an ICU MessageFormat 2 message
ox-content-i18n validate "Hello {$name}"Ox Content now ships a unified authoring and i18n language server:
cargo run -p ox_content_lsp --bin ox-content-lspYou can wire it into:
- VS Code via npm/vscode-ox-content
- Zed via editors/zed
- Neovim via editors/neovim
Supported features include:
- fast Markdown snippet completion
- frontmatter schema completion and diagnostics
- i18n key completion, hover, go-to-definition, diagnostics, and inlay hints for JS/TS
- table / code fence / callout insertion commands
- preview HTML generation for editor UIs
.mdcauthoring support
Ox Content is positioned both as a document generator and as a high-performance Markdown toolkit. The numbers below focus on the Markdown engine side.
Latest local benchmark sweep on 2026-04-24 with Node v24.15.0 on Apple M5 Pro. The tables below show median results from 7 local runs of the benchmark harness for the large 48.7 KB case.
| Library | ops/sec | avg time | throughput |
|---|---|---|---|
@ox-content/napi |
2337 | 0.43 ms | 111.20 MB/s |
md4x (napi) |
958 | 1.04 ms | 45.56 MB/s |
md4w (md4c) |
884 | 1.13 ms | 42.06 MB/s |
markdown-it |
631 | 1.58 ms | 30.04 MB/s |
marked |
385 | 2.60 ms | 18.33 MB/s |
remark |
33 | 29.97 ms | 1.59 MB/s |
| Library | ops/sec | avg time | throughput |
|---|---|---|---|
Bun.markdown.html |
3376 | 0.30 ms | 160.67 MB/s |
md4x (napi) |
3167 | 0.32 ms | 150.73 MB/s |
@ox-content/napi |
2599 | 0.38 ms | 123.66 MB/s |
md4w (md4c) |
2253 | 0.44 ms | 107.21 MB/s |
markdown-it |
628 | 1.59 ms | 29.91 MB/s |
marked |
381 | 2.62 ms | 18.15 MB/s |
micromark |
36 | 28.16 ms | 1.69 MB/s |
remark |
29 | 34.97 ms | 1.36 MB/s |
In this latest local release-build sweep, Ox Content stays ahead for parse-only throughput. The parse+render comparison now includes md4x (napi), where Bun and md4x lead the table and Ox Content remains close behind while still serving as the native core for the full documentation pipeline.
Run the benchmark with:
node benchmarks/bundle-size/parse-benchmark.mjsThe script now compares against md4w (md4c) and md4x (napi) by default and will include Bun.markdown.html automatically when bun is installed.
nix develop # Enter the pinned dev shell
vp install # Install JS dependencies through Vite+
vp fmt # Format Rust and JS/TS sources
vp check # Check Rust and JS/TS sources
vp dev # Start the docs and playground dev servers
vp build # Build Rust, npm packages, docs, and playgroundThe dev shell is pinned in flake.nix, the workspace task graph lives in vite.config.ts, and .node-version is kept for CI / non-Nix Node setup.
See the documentation for more details.
If you find Ox Content useful, please consider sponsoring the project.
MIT License - see LICENSE