Crate probe_c_api [] [src]

About probe-c-api

The probe-c-api library creates and runs short test scripts to examine the representation of types and the representations and values of constants in a C library's API. The main goal is to assist Rust-based build systems, especially Cargo build scripts, in producing bindings to C libraries automatically. Nonetheless, this approach may be extended in the nebulous future, e.g. by probing other aspects of a C API, by probing features in other C-like languages (especially C++), or by adding features to aid in writing bindings for other languages.

Source file encoding

Currently, all strings corresponding to C source code are represented as UTF-8. If this is a problem, the user may modify the compile and run functions commands to do appropriate translation.

Structs

CompileRunOutput

Outputs of both compilation and running.

Probe

A struct that stores information about how to compile and run test programs.

Enums

CProbeError

Error type used when a C API probing program fails to compile or run.

NewProbeError

Errors that can occur during probe construction.

Type Definitions

CProbeResult

Result type from most functions that create C probing programs.

CommandResult

Result of compilation and run commands. Currently just an alias for the standard library types used by std::process, since in most cases we only want to know: