package dune-build-info
Embed build information inside executable
Install
dune-project
Dependency
Authors
Maintainers
Sources
dune-3.20.2.tbz
sha256=b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549
sha512=ed14df9163e487d4ae7d0a2427eaab7823ef1f0ef2d93f0b783e6f163bbd5b44ba73f055d60b84e76f476fe11d38e794013628a1da776d9ec13cca9666e7b7ff
doc/index.html
dune-build-info
- access information generated at build time.
Introduction
This library exposes some functions to query pieces of information generated at build time, in particular:
- the version of the project being built. You can use
dune-build-info
to implement a--version
flag. - the list of libraries an executable is linked against. You can use
dune-build-info
to write a--build-info
flag that will display a software bill of materials listing the libraries used to build an executable.
Example
This displays the version number and the libraries the executable is statically linked with:
let version_string v =
match Build_info.V1.version v with
| None -> "n/a"
| Some v -> Build_info.V1.Version.to_string v
in
let version = Build_info.V1.version ();
Printf.printf "version: %s\n" (version_string version);
let libs = Build_info.V1.Statically_linked_libraries.to_list () in
Printf.printf "statically linked libraries:\n";
List.iter
(fun lib ->
let name = Build_info.V1.Statically_linked_library.name lib in
let version = Build_info.V1.Statically_linked_library.version lib in
Printf.printf "- %s (%s)\n" name (version_string version)
) libs
API documentation
The entry point for this library is Build_info.V1
.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page