This tool can help you generate and minify your HTML code at the same time. It also supports to minify JS and CSS in <style>, <script> elements, and ignores the minification of <pre> elements.
HTML is minified by the following rules:
<style> elements by using minifier.<script> elements by using minifier.<pre> elements.You should notice that the HTML code is generated and minified simultaneously, which means you don't need an extra space to store you original HTML source.
https://crates.io/crates/html-minifier
https://docs.rs/html-minifier