Scans exposed C functions in code/headers using the LLVM AST.
10K+
API-scan is a command-line utility that can analyze C source code and output a list of exported functions as XML. Such data can be used to generate bindings in other programming languages.
In addition, conversion dictionaries can be provided as arguments to automatically translate type-names or argument names.
api-scan [-o <string>] [-f <string>] [-p <string>] [-t <string>] [--]
[--version] [-h] <string> ...
Where:
-o <string>, --out-format <string>
Output format - xml/json
-f <string>, --field-dict <string>
File containing translations for struct field names
-p <string>, --param-dict <string>
File containing translations for parameter names
-t <string>, --type-dict <string>
File containing translations for function types
--, --ignore_rest
Ignores the rest of the labeled arguments following this flag.
--version
Displays version information and exits.
-h, --help
Displays usage information and exits.
<string> (accepted multiple times)
(required) Source files to scan
Scans C code/header files for exposed functions and structs, and returns
function and type information as XML or JSON.
This utility was designed to scan exported methods in libsodium. At the moment that is also the only project on which this utility was tested.
FROM 1of0/api-scan
# ...
ENTRYPOINT api-scan /path/to/your/sourcefiles
#definesContent type
Image
Digest
Size
302.9 MB
Last updated
almost 10 years ago
docker pull 1of0/api-scan