sass_alt/
lib.rs

1// This file is part of sass-alt. It is subject to the license terms in the COPYRIGHT file found in the top-level directory of this distribution and at https://raw.githubusercontent.com/lemonrock/sass-alt/master/COPYRIGHT. No part of sass-alt, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the COPYRIGHT file.
2// Copyright © 2017 The developers of sass-alt. See the COPYRIGHT file in the top-level directory of this distribution and at https://raw.githubusercontent.com/lemonrock/sass-alt/master/COPYRIGHT.
3
4
5#![deny(missing_docs)]
6#![recursion_limit="128"]
7
8
9//! This crate provides a simple API that allows one to compile SASS and use Rust functions as SASS functions, importers and headers.
10//! It is used by the Cordial crate to allow Lua code to be embedded inside SASS.
11//! To get started:-
12//!
13//! ```
14//! extern crate sass_alt;
15//!
16//! use sass_alt::FunctionList;
17//! use sass_alt::InputSyntax;
18//! use sass_alt::SassOptions;
19//!
20//! fn main()
21//! {
22//! 	let sass_functions = vec![];
23//! 	let function_list = Rc::new(SassFunctionList(sass_functions));
24//!
25//! 	let importer_functions = vec![];
26//! 	let importer_list = Rc::new(SassImportersList(importer_functions));
27//!
28//! 	let header_functions = vec![];
29//! 	let header_list = Rc::new(SassImportersList(header_functions));
30//!
31//! 	let css = SassOptions::minified_css(InputSyntax::SCSS, &["/path/to/sass/includes"], &function_list, &importer_list, &header_list).compile_data(".hello { color: red }").unwrap();
32//! }
33//! ```
34//!
35
36extern crate libc;
37#[macro_use] extern crate quick_error;
38pub extern crate sass_sys;
39
40
41use self::values::*;
42use ::libc::c_char;
43use ::libc::c_void;
44use ::sass_sys::*;
45use ::std::borrow::Cow;
46use ::std::clone::Clone;
47use ::std::error::Error;
48use ::std::ffi::CStr;
49use ::std::ffi::CString;
50use ::std::ffi::NulError;
51use ::std::ffi::OsString;
52use ::std::fmt::Debug;
53use ::std::mem::forget;
54use ::std::path::Path;
55use ::std::ptr::null;
56use ::std::ptr::null_mut;
57use ::std::rc::Rc;
58use ::std::str::Utf8Error;
59
60
61/// Wrappers for Sass_Value
62pub mod values;
63
64
65include!("CalleesSassCompilerIterator.rs");
66include!("DataOrFileSassContextMutPointer.rs");
67include!("ImportsSassCompilerIterator.rs");
68include!("InputSyntax.rs");
69include!("OutputStyle.rs");
70include!("Sass_Callee_Entry_Ext.rs");
71include!("Sass_Compiler_Ext.rs");
72include!("Sass_Context_Ext.rs");
73include!("Sass_Env_Frame_Ext.rs");
74include!("Sass_Function_Entry_Ext.rs");
75include!("Sass_Function_List_Ext.rs");
76include!("Sass_Import_Entry_Ext.rs");
77include!("Sass_Import_List_Ext.rs");
78include!("Sass_Importer_Entry_Ext.rs");
79include!("Sass_Importer_List_Ext.rs");
80include!("Sass_Options_Ext.rs");
81include!("SassCompileError.rs");
82include!("SassCompiler.rs");
83include!("SassContext.rs");
84include!("SassFunction.rs");
85include!("SassFunctionList.rs");
86include!("SassFunctionSignature.rs");
87include!("SassFunctionTraitObject.rs");
88include!("SassImport.rs");
89include!("SassImportEntry.rs");
90include!("SassImporter.rs");
91include!("SassImporterError.rs");
92include!("SassImporterList.rs");
93include!("SassImporterTraitObject.rs");
94include!("SassOptions.rs");