# C-API

The C-API lets programs in other languages configure, run and read out simulations through the shared library; CADET-Python uses it to run simulations from Python.
Its functions are collected in a versioned struct of function pointers, which {c:func}`cdtGetAPIv1_1_0a2` fills.
Earlier versions remain available for backwards compatibility; this page documents the latest one.
The rules for changing the C-API are described in {ref}`capi`.

## Entry point

```{doxygenfunction} cdtGetAPIv1_1_0a2
```

```{doxygenstruct} cdtAPIv1_1_0a2
:members:
```

## Parameter provider

A caller passes the simulation configuration as a {c:struct}`cdtParameterProvider`, a struct of callbacks that CADET-Core queries for parameter values.

```{doxygenstruct} cdtParameterProvider
:members:
```

## Logging

```{doxygentypedef} cdtLogHandler
```

```{doxygenfunction} cdtSetLogReceiver
```

```{doxygenfunction} cdtSetLogLevel
```

```{doxygenfunction} cdtGetLogLevel
```

## Library information

```{doxygenfunction} cdtGetLibraryVersion
```

```{doxygenfunction} cdtGetLatestCAPIVersion
```

```{doxygenfunction} cdtGetLibraryCommitHash
```

```{doxygenfunction} cdtGetLibraryBuildType
```
