qiskit/crates/cext/cbindgen.toml

44 lines
967 B
TOML

language = "C"
include_version = true
include_guard = "QISKIT_H"
style = "type"
sys_includes = ["complex.h"]
after_includes = """
#ifdef QISKIT_C_PYTHON_INTERFACE
#include <Python.h>
#endif
// Complex number typedefs -- note these are memory aligned but
// not calling convention compatible.
#ifdef _MSC_VER
typedef _Fcomplex QkComplex32;
typedef _Dcomplex QkComplex64;
#else
typedef float complex QkComplex32;
typedef double complex QkComplex64;
#endif
// Always expose [cfg(feature = "cbinding")] -- workaround for
// https://github.com/mozilla/cbindgen/issues/995
#define QISKIT_WITH_CBINDINGS
"""
[defines]
"feature = cbinding" = "QISKIT_WITH_CBINDINGS"
"feature = python_binding" = "QISKIT_C_PYTHON_INTERFACE"
[parse]
parse_deps = true
include = ["qiskit-accelerate"]
[enum]
prefix_with_name = true
[export.rename]
"SparseObservable" = "QkObs"
"CSparseTerm" = "QkObsTerm"
"BitTerm" = "QkBitTerm"
"Complex64" = "QkComplex64"
"ExitCode" = "QkExitCode"