Expand description
The core of the autocxx
engine, used by both the
autocxx_macro
and also code generators (e.g. autocxx_build
).
See IncludeCppEngine for general description of how this engine works.
Structs§
- Autocxxgen
Header Namer - Function to generate the desired name of the header containing autocxx’s
extra generated C++.
Newtype wrapper so we can give it a
Default
. - Builder
- An object to allow building of bindings from a
build.rs
file. - Builder
Success - For test purposes only, a
cc::Build
and lists of Rust and C++ files generated. - Codegen
Options - Code generation options.
- CppCodegen
Options - Options for C++ codegen
- CppFile
Pair - Some C++ content which should be written to disk and built.
- Cxxgen
Header Namer - Function to generate the desired name of the header containing cxx’s
declarations.
Newtype wrapper so we can give it a
Default
. - Generated
Cpp - All generated C++ content which should be written to disk.
- Include
CppEngine - Core of the autocxx engine.
- Located
SynError - A
syn::Error
which also implementsmiette::Diagnostic
so can be pretty-printed to show the affected span of code. - Parsed
File - A Rust file parsed by autocxx. May contain zero or more autocxx ‘engines’,
i.e. the
IncludeCpp
class, corresponding to zero or more include_cpp macros within this file. Also containssyn::Item
structures for all the rest of the Rust code, such that it can be reconstituted if necessary. - RsOutput
- Opaque structure representing the Rust which needs to be generated
for a given
include_cpp!
macro. You will want to pass this into eithergenerate_rs_single
orgenerate_rs_archive
.
Enums§
- Builder
Error - Errors returned during creation of a
cc::Build
from an include_cxx macro. - Error
- Errors which may occur in generating bindings for these C++ functions.
- Parse
Error - Errors which may occur when parsing a Rust source file to discover and interpret include_cxx macros.
Statics§
- HEADER
- The complete contents of the “rust/cxx.h” header.
Traits§
- Builder
Context - The context in which a builder object lives. Callbacks for various purposes.
- Rebuild
Dependency Recorder - Implement to learn of header files which get included by this build process, such that your build system can choose to rerun the build process if any such file changes in future.
Functions§
- do_
cxx_ cpp_ generation - generate_
rs_ archive - Creates an on-disk archive (actually a JSON file) of the Rust side of the bindings
for multiple
include_cpp
macros. If you use this, you will want to tellautocxx_macro
how to find this file using theAUTOCXX_RS_JSON_ARCHIVE
environment variable. - generate_
rs_ single - Gets the Rust code corresponding to a single
RsOutput
. You can write this to a file which can simply beinclude!
ed byautocxx_macro
when you give it theAUTOCXX_RS_FILE
environment variable. - get_
clang_ path - Get the path to clang which is effective for any preprocessing operations done by autocxx.
- get_
cxx_ header_ bytes - make_
clang_ args - Get clang args as if we were operating clang the same way as we operate bindgen.
- parse_
file - Parse a Rust file, and spot any include_cpp macros within it.
- preprocess
- Preprocess a file using the same options as is used by autocxx. Input: listing_path, output: preprocess_path.
Type Aliases§
- Builder
Build - Builder
Result - Results of a build.
- Result
- Result type.