flintThis repository hosts a curated collection of chert compositions (composition.json) for flint, the C/C++ build system and package manager.
A composition file acts as the blueprint for flint. It instructs the build system on where to fetch a dependency, which source files to include or ignore, where headers are located, and which compiler/linker options to pass during compilation.
At the root level, a composition.json file contains a JSON object where each key represents the package name (e.g., "lua").
"<package_name>": {
"version": "...",
"remote": "...",
"flags": [...],
"lib_links": [...],
"excludes": [...],
"include_paths": [...],
"src": [...]
}
version (String) — Mandatory"v5.5.1", "1.2.11"). If no tags are available use "unknown".remote (String) — Mandatory"[https://github.com/lua/lua](https://github.com/lua/lua)").flags (Array of Strings)["-std=c99", "-O2", "-DLUA_USE_LINUX", "-Wall"]lib_links (Array of Strings)-l).["-ldl", "-lm", "-lpthread"]excludes (Array of Strings)src) that should not be compiled into the library (such as executable entry points, test drivers, or unused platform implementations).["lua.c", "luac.c"]include_paths (Array of Strings).h, .hpp) needed by the compiler (equivalent to -I paths)."" to specify the repository root directory itself.src (Array of Strings).c, .cpp) to be compiled."" to specify the repository root directory itself.Here is a complete example defining a composition for the Lua C library:
"lua": {
"version": "v5.5.1",
"remote": "https://github.com/lua/lua",
"flags": [
"-std=c99",
"-O2",
"-Wall",
"-Wextra",
"-Wfatal-errors",
"-Wshadow",
"-Wundef",
"-Wwrite-strings",
"-Wredundant-decls",
"-Wdisabled-optimization",
"-Wdouble-promotion",
"-Wmissing-declarations",
"-Wconversion",
"-Wlogical-op",
"-Wno-aggressive-loop-optimizations",
"-Wdeclaration-after-statement",
"-Wmissing-prototypes",
"-Wnested-externs",
"-Wstrict-prototypes",
"-Wc++-compat",
"-Wold-style-definition",
"-DLUA_USE_LINUX",
"-fno-stack-protector",
"-fno-common",
"-Wl,-E"
],
"lib_links": [
"-ldl",
"-lm"
],
"excludes": [
"lua.c",
"onelua.c"
],
"include_paths": [
""
],
"src": [
""
]
}
Identify Target Repository & Version Tag: Prerequisite.
Locate the canonical upstream Git repository URL and identify the precise target version tag (e.g., v1.2.0). Ensure the tag exists on the remote host.
Analyze Upstream Source Layout: Directory Discovery.
Inspect the repository folder structure. Make a list of all directories containing source files (.c/.cpp) and header files (.h/.hpp). Remember that flint does not recursively scan subdirectories, so child folders must be explicitly enumerated.
Filter Exclusions & Main Entry Points:
Identify standalone executable source files (e.g., main.c, CLI runners, or tests) that should not be included when compiling as a reusable library component. Add these to the excludes array.
Set Platform & Linker Options:
Check the upstream build system (e.g., Makefile or CMakeLists.txt) to extract required preprocessor definitions (e.g., -D_GNU_SOURCE), compilation optimization flags, and mandatory system library links (e.g., -lpthread, -lm).
Validate JSON Syntax: Ensure your generated block strictly adheres to valid JSON rules (e.g., no trailing commas, double-quoted keys and string values).
When submitting a new library composition to this repository:
docs/compositions.md with separate section for the new chert composition with language specification and description.version matches an official tag on the upstream remote.flint fetches and builds the package cleanly without missing symbol warnings or missing include headers.14 commits
HTML
79.2%
JavaScript
20.6%
flintThis repository hosts a curated collection of chert compositions (composition.json) for flint, the C/C++ build system and package manager.
A composition file acts as the blueprint for flint. It instructs the build system on where to fetch a dependency, which source files to include or ignore, where headers are located, and which compiler/linker options to pass during compilation.
At the root level, a composition.json file contains a JSON object where each key represents the package name (e.g., "lua").
"<package_name>": {
"version": "...",
"remote": "...",
"flags": [...],
"lib_links": [...],
"excludes": [...],
"include_paths": [...],
"src": [...]
}
version (String) — Mandatory"v5.5.1", "1.2.11"). If no tags are available use "unknown".remote (String) — Mandatory"[https://github.com/lua/lua](https://github.com/lua/lua)").flags (Array of Strings)["-std=c99", "-O2", "-DLUA_USE_LINUX", "-Wall"]lib_links (Array of Strings)-l).["-ldl", "-lm", "-lpthread"]excludes (Array of Strings)src) that should not be compiled into the library (such as executable entry points, test drivers, or unused platform implementations).["lua.c", "luac.c"]include_paths (Array of Strings).h, .hpp) needed by the compiler (equivalent to -I paths)."" to specify the repository root directory itself.src (Array of Strings).c, .cpp) to be compiled."" to specify the repository root directory itself.Here is a complete example defining a composition for the Lua C library:
"lua": {
"version": "v5.5.1",
"remote": "https://github.com/lua/lua",
"flags": [
"-std=c99",
"-O2",
"-Wall",
"-Wextra",
"-Wfatal-errors",
"-Wshadow",
"-Wundef",
"-Wwrite-strings",
"-Wredundant-decls",
"-Wdisabled-optimization",
"-Wdouble-promotion",
"-Wmissing-declarations",
"-Wconversion",
"-Wlogical-op",
"-Wno-aggressive-loop-optimizations",
"-Wdeclaration-after-statement",
"-Wmissing-prototypes",
"-Wnested-externs",
"-Wstrict-prototypes",
"-Wc++-compat",
"-Wold-style-definition",
"-DLUA_USE_LINUX",
"-fno-stack-protector",
"-fno-common",
"-Wl,-E"
],
"lib_links": [
"-ldl",
"-lm"
],
"excludes": [
"lua.c",
"onelua.c"
],
"include_paths": [
""
],
"src": [
""
]
}
Identify Target Repository & Version Tag: Prerequisite.
Locate the canonical upstream Git repository URL and identify the precise target version tag (e.g., v1.2.0). Ensure the tag exists on the remote host.
Analyze Upstream Source Layout: Directory Discovery.
Inspect the repository folder structure. Make a list of all directories containing source files (.c/.cpp) and header files (.h/.hpp). Remember that flint does not recursively scan subdirectories, so child folders must be explicitly enumerated.
Filter Exclusions & Main Entry Points:
Identify standalone executable source files (e.g., main.c, CLI runners, or tests) that should not be included when compiling as a reusable library component. Add these to the excludes array.
Set Platform & Linker Options:
Check the upstream build system (e.g., Makefile or CMakeLists.txt) to extract required preprocessor definitions (e.g., -D_GNU_SOURCE), compilation optimization flags, and mandatory system library links (e.g., -lpthread, -lm).
Validate JSON Syntax: Ensure your generated block strictly adheres to valid JSON rules (e.g., no trailing commas, double-quoted keys and string values).
When submitting a new library composition to this repository:
docs/compositions.md with separate section for the new chert composition with language specification and description.version matches an official tag on the upstream remote.flint fetches and builds the package cleanly without missing symbol warnings or missing include headers.14 commits
HTML
79.2%
JavaScript
20.6%