package dune-build-info

  1. Overview
  2. Docs

Provide build-time information.

The entry points in this module are version and Statically_linked_libraries.to_list.

Implementation note: this module is implemented using special support from Dune. When an executable is linked, a special "blank" placeholder is stored as a string. A special post-link phase called artifact substitution can replace this placeholder with encoded data that will be decoded by this library.

Artifact substitution happens when an executable is installed or promoted to the source tree.

module Version : sig ... end

Version numbers.

val version : unit -> Version.t option

The version at which the current executable was built.

The version is None during development, it is only Some _ once artifact substitution happened.

module Statically_linked_library : sig ... end

A library with an optional version number.

module Statically_linked_libraries : sig ... end

Entry points to find Statically_linked_library values.