1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
// 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.
// 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.


#![deny(missing_docs)]


//! This crate provides a simple API that allows one to compile SASS and use Rust functions as SASS functions, importers and headers.
//! It is used by the Cordial crate to allow Lua code to be embedded inside SASS.
//! To get started:-
//!
//! ```
//! extern crate sass_alt;
//!
//! use sass_alt::FunctionList;
//! use sass_alt::InputSyntax;
//! use sass_alt::SassOptions;
//!
//! fn main()
//! {
//! 	let sass_functions = vec![];
//! 	let function_list = Rc::new(SassFunctionList(sass_functions));
//!
//! 	let importer_functions = vec![];
//! 	let importer_list = Rc::new(SassImportersList(importer_functions));
//!
//! 	let header_functions = vec![];
//! 	let header_list = Rc::new(SassImportersList(header_functions));
//!
//! 	let css = SassOptions::minified_css(InputSyntax::SCSS, &["/path/to/sass/includes"], &function_list, &importer_list, &header_list).compile_data(".hello { color: red }").unwrap();
//! }
//! ```
//!


extern crate libc;
#[macro_use] extern crate quick_error;
pub extern crate sass_sys;


use self::values::*;
use ::libc::c_char;
use ::libc::c_void;
use ::sass_sys::*;
use ::std::borrow::Cow;
use ::std::clone::Clone;
use ::std::ffi::CStr;
use ::std::ffi::CString;
use ::std::ffi::OsString;
use ::std::fmt::Debug;
use ::std::mem::forget;
use ::std::path::Path;
use ::std::ptr::null;
use ::std::ptr::null_mut;
use ::std::rc::Rc;
use ::std::str::Utf8Error;


/// Wrappers for Sass_Value
pub mod values;


include!("CalleesSassCompilerIterator.rs");
include!("DataOrFileSassContextMutPointer.rs");
include!("ImportsSassCompilerIterator.rs");
include!("InputSyntax.rs");
include!("OutputStyle.rs");
include!("Sass_Callee_Entry_Ext.rs");
include!("Sass_Compiler_Ext.rs");
include!("Sass_Context_Ext.rs");
include!("Sass_Env_Frame_Ext.rs");
include!("Sass_Function_Entry_Ext.rs");
include!("Sass_Function_List_Ext.rs");
include!("Sass_Import_Entry_Ext.rs");
include!("Sass_Import_List_Ext.rs");
include!("Sass_Importer_Entry_Ext.rs");
include!("Sass_Importer_List_Ext.rs");
include!("Sass_Options_Ext.rs");
include!("SassCompileError.rs");
include!("SassCompiler.rs");
include!("SassContext.rs");
include!("SassFunction.rs");
include!("SassFunctionList.rs");
include!("SassFunctionSignature.rs");
include!("SassFunctionTraitObject.rs");
include!("SassImporter.rs");
include!("SassImporterList.rs");
include!("SassImporterTraitObject.rs");
include!("SassOptions.rs");