[][src]Crate json_compilation_db

This crate provides support for reading and writing JSON compilation database files.

A compilation database is a set of records which describe the compilation of the source files in a given project. It describes the compiler invocation command to compile a source module to an object file.

This database can have many forms. One well known and supported format is the JSON compilation database, which is a simple JSON file having the list of compilation as an array. The definition of the JSON compilation database files is done in the LLVM project documentation.

Structs

Entry

Represents an entry of the compilation database.

Format

Represents the expected format of the JSON compilation database.

Enums

Error

This error type encompasses any error that can be returned by this crate.

Constants

DEFAULT_FILE_NAME

The conventional name for a compilation database file which tools are looking for.

Functions

from_file

Load the content of the given file and parse it as a compilation database.

from_reader

Load the content of the given stream and parse it as a compilation database.

to_file

Persists the entries into the given file name with the given format.

to_writer

Persists the entries into the given stream with the given format.

Type Definitions

Entries

Represents the content of the compilation database.