package core_kernel

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

When you read the words "version util" below, try adding the word "info" to them: "version util info" makes a little more sense.

val get_version_util : contents_of_exe:string -> string option

Gets the version util if it exists.

Since 2022-11, this function is guaranteed to be bidirectionally compatible if we ever change the version util format. We guarantee that:

  • New versions of this function will always be able to parse the version util out of all binaries built after 2022-11.
  • Versions of this function which are less than one month old will always be able to parse the version util out of new binaries. Older versions of this function may not be able to parse the version util out of new binaries.

If you care about performance, consider using lib/fast_get_version_util_from_file. It is around 10-20x faster than this function, which can take a small number of seconds for several hundred megabyte binaries.

val replace_version_util : contents_of_exe:string -> Version.t list option -> string option

Inserts the given version util into the executable text given. Returns None if this could not happen (e.g., the given executable has no version util sections).

None means to remove the version util. The purpose is to make it possible to compare executables up to version util.

val parse_generated_hg_version : string -> string list

Turns raw hg version info into the standard string list format that version_list returns.

module Experimental : sig ... end
module For_tests : sig ... end
OCaml

Innovation. Community. Security.