This crate is a wrapper around libsass, currently tracking v3.4.5.
sass-rs
exposes 2 functions that are self-explanatory:
compile_file(path: &str, options: Options)
compile_string(content: &str, 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 sass_rs::{Options, OutputStyle};
let mut options = Options::default();
options.output_style = OutputStyle::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