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
build - An object to allow building of bindings from a
build.rsfile. - Builder
Success build - For test purposes only, a
cc::Buildand 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::Errorwhich also implementsmiette::Diagnosticso 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
IncludeCppclass, corresponding to zero or more include_cpp macros within this file. Also containssyn::Itemstructures 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_singleorgenerate_rs_archive.
Enums§
- Builder
Error build - Errors returned during creation of a
cc::Buildfrom 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 build - 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_cppmacros. If you use this, you will want to tellautocxx_macrohow to find this file using theAUTOCXX_RS_JSON_ARCHIVEenvironment 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_macrowhen you give it theAUTOCXX_RS_FILEenvironment 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 build - Builder
Result build - Results of a build.
- Result
- Result type.