Open MarcosCosmos opened 6 years ago
I'm not aware of an existing Rust minifier.
The bundler currently runs rustfmt
on a stringified TokenStream
, which look like this:
fn main ( ) { println ! ( "Hello, world!" ) ; }
A simple way to "minify" the output would be to not run rustfmt
and stringify the token stream in a way that doesn't include unnecessary whitespace.
Along with the existing pretty print, it may be useful to support minified code output.
I assume this won't be especially difficult since you're already using syntax trees?