sass-rs 0.2.1

Higher level binding for the Sass library
Documentation

sass-rs

Build Status Windows build status

Api documentation on docs.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 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

Not supported yet

Importers and functions are not supported yet.