sass-rs
This crate is a wrapper around libsass, currently tracking v3.4.7.
How to use
sass-rs
exposes 2 functions that are self-explanatory:
compile_file(path: &str, options: Options)
compile_file<P: AsRef<Path>>(path: P, options: Options)
Most of the time, you should be able to use the Options::default()
but you can change the
output style that way for example:
use ;
let mut options = default;
options.output_style = Compressed;
You can see an example in the examples
directory, which can be ran with the following command:
cargo run --example compile_sass examples/simple.scss