package dune-build-info
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Embed build information inside executable
Install
dune-project
Dependency
Authors
Maintainers
Sources
dune-3.21.1.tbz
sha256=84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94
sha512=d9fa44e24036d2593adfe59e52e0ad64f3e7e973d23f84af57fc79e38fa210630b0cb55590f314d6ef455333b96a8e0ce188c2720eaae44576222541ba78efb3
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-infoto implement a--versionflag. - the list of libraries an executable is linked against. You can use
dune-build-infoto write a--build-infoflag 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)
) libsAPI 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