Skip to content

v.util.version #

Constants #

const v_version = '0.4.3'

fn full_hash #

fn full_hash() string

fn full_v_version #

fn full_v_version(is_verbose bool) string

full_v_version() returns the full version of the V compiler

fn githash #

fn githash(should_get_from_filesystem bool) string

githash(x) returns the current git commit hash. When x is false, it is very fast - it just returns a predefined C constant. When x is true, it tries to get the current commit hash, by parsing the relevant files in the .git/ folder, or if that is not possible for example when using a V from a V binary release, that does not have .git/ defaults to getting the predefined C constant again.

Note: githash(true) must be called only when v detects that it builds itself. For all other programs, githash(false) should be used.

fn vhash #

fn vhash() string

vhash() returns the build string C.V_COMMIT_HASH . See cmd/tools/gen_vc.v .