Open
Conversation
- Add wasm-bindgen setup with Cargo.toml - Implement to_html and to_html_with_options APIs - Support CommonMark, GFM, MDX, and frontmatter
- Create async/sync JavaScript API wrapper - Configure package.json with .mjs build script - Handle WASM initialization and module loading
- Test basic markdown conversions - Test GFM, MDX, and security options - Test sync/async APIs - Cover edge cases and complex markdown
- Add comprehensive README with API documentation - Add basic usage example - Add advanced options example - Include MIT LICENSE file
- Add wasm to Cargo workspace - Setup pnpm workspace with wasm directory - Add root package.json for development scripts - Update .gitignore for WASM build artifacts
Owner
|
Thanks for working on this! |
- Scope package as @wooorm/markdown-wasm - Export lib/index.mjs (+ types) - Add examples script and require Node >=18 - Update Whitelist files Refs: wooorm#185
Author
|
I’m not fully confident in this change. |
Collaborator
|
I haven't had a chance to pull down the code and try it out (traveling presently). |
- Add @wooorm/markdown-wasm - Update wasm/README.md with correct package name - Fix installation and import examples to use @wooorm/markdown-wasm
|
Is the AST compatible with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Provides minimal WebAssembly bindings for markdown-rs, addressing the WASM hanging issues mentioned in #182 while following maintainer preference for WASM-only approach (no NAPI).
Background
This PR takes a different approach from #182
Key Improvements
npmpackage using napi-rs #182.mjsextension for proper Node.js module resolutionImplementation
Why Pure WASM?
Per maintainer feedback on #182:
Testing
Performance
While NAPI may be faster, WASM provides:
This approach prioritizes maintainability and reliability over maximum performance, aligning with project goals.
Related to #182