Package dune-build-info 3.17.2

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:

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.

Package info

authors
  • Jane Street Group, LLC <opensource@janestreet.com>
changes-files
depends
homepage
issues
license
  • MIT
license-files
maintainers
  • Jane Street Group, LLC <opensource@janestreet.com>
online-doc
readme-files
repo
  • git+https://github.com/ocaml/dune.git
version
  • 3.17.2