Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rust-based WASM HTML parser #286

Merged
merged 13 commits into from
Nov 13, 2022
Merged

Rust-based WASM HTML parser #286

merged 13 commits into from
Nov 13, 2022

Conversation

tbranyen
Copy link
Owner

@tbranyen tbranyen commented Nov 8, 2022

This introduces an alternative HTML parser written in Rust. Currently this is using a third party library called tl and wasm-bindgen to convert from Rust structures into JavaScript using WASM.

  • Get CI builds and tests working
  • Start migrating more responsibilities into the tagged template vs in the parser
  • Get integration working with diffhtml core
  • Write documentation and test babel integration
  • Try and reuse more html tests
  • Get filesize down further and improve performance
  • Add documentation for webpack, esbuild, and vite

@tbranyen tbranyen force-pushed the rust-wasm-parser branch 3 times, most recently from 9392bda to 109c40c Compare November 12, 2022 16:57
@tbranyen tbranyen changed the title Initial commit of Rust-based WASM HTML parser Rust-based WASM HTML parser Nov 12, 2022
@tbranyen
Copy link
Owner Author

Just added a webpack example using the WASM parser at runtime for development and in Babel for compile-time consistency. The production bundle gets as low as 7Kb with gzip!

@tbranyen
Copy link
Owner Author

I'm going to merge since there are updates here I want to use to influence the new JS HTML parser PR (such as removing all the fragment flattening and dynamic interpolation).

@tbranyen tbranyen merged commit 6d7836e into master Nov 13, 2022
@tbranyen tbranyen deleted the rust-wasm-parser branch November 28, 2022 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant