Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/HerringtonDarkholme/vue-compiler
Vue's template compiler reimplemented in Rust!
https://github.com/HerringtonDarkholme/vue-compiler
compiler rust vue vuejs
Last synced: 6 days ago
JSON representation
Vue's template compiler reimplemented in Rust!
- Host: GitHub
- URL: https://github.com/HerringtonDarkholme/vue-compiler
- Owner: HerringtonDarkholme
- License: mit
- Created: 2021-08-19T02:53:06.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-27T15:47:44.000Z (14 days ago)
- Last Synced: 2024-10-27T18:19:42.171Z (14 days ago)
- Topics: compiler, rust, vue, vuejs
- Language: Rust
- Homepage:
- Size: 36.5 MB
- Stars: 1,040
- Watchers: 9
- Forks: 38
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Roadmap: docs/roadmap.md
Awesome Lists containing this project
- awesome-rust-zh - Rust实现Vue编译器
README
# Vue Compiler in Rust
Try it out in the wasm playground!
![CI](https://github.com/HerringtonDarkholme/vue-compiler/actions/workflows/ci.yml/badge.svg)
![Playground](https://github.com/HerringtonDarkholme/vue-compiler/actions/workflows/gh-pages.yml/badge.svg)
[![codecov](https://codecov.io/gh/HerringtonDarkholme/vue-compiler/branch/main/graph/badge.svg?token=A37GRLYA5R)](https://codecov.io/gh/HerringtonDarkholme/vue-compiler)Evan [says](https://github.com/vuejs/rfcs/discussions/369#discussioncomment-1192421):
> Maybe in the long run we want the whole transform (and even the Vue compiler!) to be implemented in native Go/Rust so performance would no longer be a concern ;)
Future is now!
## Project Docs
* [Architecture Design](https://github.com/HerringtonDarkholme/vue-compiler/blob/main/docs/design.md)
* [Project Roadmap](https://github.com/HerringtonDarkholme/vue-compiler/blob/main/docs/roadmap.md)
* [Contributing Guide](https://github.com/HerringtonDarkholme/vue-compiler/blob/main/.github/CONTRIBUTING.md)## Intended Usage
* Rust library
* CLI binary
* napi based nodejs library
* wasm based npm package: a fallback if napi fails to work and a toy for browser.
* No Browser build
No support since most features in full build are additional except for browser based expression checking or HTML escaping. Browser build removed them for size. But template compiler in browser is already for toy project. For browser specific summary see [this google sheet](https://docs.google.com/spreadsheets/d/1Uofb9qW9-gxdSh8lbC-CE0kWkhpAAtTFDZlw9UW0HrE/edit?usp=sharing).## Reference
* [vuejs/core](https://github.com/vuejs/core): ご本家様
* [html spec](https://html.spec.whatwg.org/multipage/parsing.html) is the definitive guide for parsing HTML-like files.
* [Vue Template Explorer](https://template-explorer.vuejs.org/) gives instant results for code generation and error reporting.
* [Nu html checker](https://validator.w3.org/nu/#textarea) is the official html validator from W3C. This is the canonical error reporter for html parsing, when there is a discrepancy between the framework and the spec.
* [AST explorer](https://astexplorer.net/) can inspect AST nodes interactively.