Vue's template compiler reimplemented in Rust!
The Vue Compiler in Rust is a project aimed at implementing the Vue compiler in native Go/Rust for improved performance. The project includes a Rust library, CLI binary, and NAPI-based Node.js library. It also offers a wasm-based npm package as a fallback option and a toy for browsers. The project does not support browser builds and removed certain features for size optimization. The project references the official HTML spec for parsing HTML-like files and uses tools like Vue Template Explorer, Nu HTML Checker, and AST Explorer for code generation, error reporting, and inspecting AST nodes.
To install the Vue Compiler in Rust, you can follow these steps:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
git clone https://github.com/vuejs/vue-next.git
cd vue-next
cargo build
cargo install --path packages/@vue/compiler-cli
cd packages/vue/compiler-core
npm install
npm install @vue/compiler-slim
The Vue Compiler in Rust project aims to improve the performance of the Vue compiler by implementing it in native Go/Rust. It provides various libraries and tools for compiling Vue templates, including a Rust library, CLI binary, and NAPI-based Node.js library. The project also offers a wasm-based npm package as a fallback option for browsers. While the project does not support browser builds, it uses the official HTML spec for parsing HTML-like files and utilizes tools like Vue Template Explorer, Nu HTML Checker, and AST Explorer for code generation and error reporting.