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
#![recursion_limit = "1024"] // for error_chain

//! Utility types and functions used by `cpp_to_rust_generator` and
//! `cpp_to_rust_build_tools` crates.
//!
//! See [README](https://github.com/rust-qt/cpp_to_rust)
//! for more information.
//!
#[macro_use]
extern crate error_chain;
extern crate backtrace;
extern crate regex;
#[macro_use]
extern crate serde_derive;
extern crate serde;
extern crate serde_json;
extern crate bincode;
extern crate term_painter;
extern crate num_cpus;
#[macro_use]
extern crate lazy_static;
pub extern crate toml;

pub mod log;
pub mod errors;

pub mod file_utils;
pub mod string_utils;
pub mod utils;

pub mod cpp_build_config;
pub mod cpp_lib_builder;
pub mod target;

/// This type contains data serialized by the generator and placed to the
/// generated crate's directory. The build script reads and uses this value.
#[derive(Debug, Clone)]
#[derive(Serialize, Deserialize)]
pub struct BuildScriptData {
  /// Information required to build the C++ wrapper library
  pub cpp_build_config: cpp_build_config::CppBuildConfig,
  /// Name of the original C++ library passed to the generator
  pub cpp_lib_version: Option<String>,
  /// Name of C++ wrapper library
  pub cpp_wrapper_lib_name: String,
}

#[cfg(test)]
mod tests;