-
-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Summary
I'd like to propose adding npm package distribution for mdxjs-rs to make it easier to integrate into Node.js projects like Astro, Next.js, and other build tools.
Background
Currently, mdxjs-rs is an excellent Rust implementation of MDX, but it requires custom bindings to use from Node.js. This creates barriers for adoption:
- Each project needs to create their own bindings
- Maintenance burden is duplicated across projects
- Performance benefits are not easily accessible
Use Case
At Astro, we're working on integrating mdxjs-rs to provide 5-15x faster MDX compilation for large sites (PR #14080). However, we need to either:
- Create custom bindings (maintenance burden)
- Use third-party packages like @rspress/mdx-rs (which appears unmaintained)
Proposal
Would you consider:
-
Publishing official npm package with pre-built binaries for major platforms
- Similar to how @swc/core or @parcel/watcher work
- Using N-API for stability across Node versions
-
Minimal API surface to start:
import { compile, compileSync } from 'mdxjs-rs'; const result = await compile(mdxContent, { filepath: 'example.mdx', development: true });
Metadata
Metadata
Assignees
Labels
No labels