Struct cpp_to_rust_build_tools::Config [] [src]

pub struct Config { /* fields omitted */ }

Configuration of the build script.

Methods

impl Config
[src]

Constructs default configuration state based on information in the generated build_script_data.json file located at the crate root. The caller may change CppBuildPaths and CppBuildConfig values stored in this object and call config.run() to apply them.

Returns version of the native C++ library used for generating this crate. This is the value set with Config::set_cpp_lib_version during generation, or None if the version was not set.

Returns current CppBuildConfig data.

Returns mutable CppBuildConfig data.

Sets new CppBuildConfig data.

Returns current CppBuildPaths data.

Returns mutable CppBuildPaths data.

Sets new CppBuildPaths data.

Same as run(), but result of the operation is returned to the caller.

Starts build script with current configuration. The build script performs the following operations:

  • Build the C++ wrapper library;
  • Generate ffi.rs file with actual link attributes;
  • Determine C++ type sizes on current platform and generate type_sizes.rs;
  • Report linking information to cargo.

This function ends the process with the appropriate error code and never returns to the caller.

Trait Implementations

impl Debug for Config
[src]

Formats the value using the given formatter.