package dune-build-info
Embed build information inside executable
Install
Dune Dependency
Authors
Maintainers
Sources
dune-3.13.1.tbz
sha256=2fe0af1b4cf98649c7555b555d9f4f81d5ded87718a89df4988e214a56c8a916
sha512=25b95d616f5d62d065c4458caa211c20615e1bf361fd13d6fd037c216b9566034b45581b7b1dfe43f051c3cdbcf5fe8ffb9c74b5974f2fb6204a3da11ea87c28
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