harec

[hare] Hare compiler, written in C11 for POSIX OSs
Log | Files | Refs | README | LICENSE

env.txt (1219B)


      1 harec uses environment variables to seek out modules to reference in the current
      2 unit. The user is responsible for building dependencies first and ensuring that
      3 they appear in the module cache.
      4 
      5 The following environment variables are used:
      6 
      7 HARECACHE
      8 	Path to the module cache, defaults to ~/.cache/hare. For each imported
      9 	module, harec will construct the path $HARECACHE/$modname/$modversion.td
     10 	to look up the module API, where $modname has namespace delimiters '::'
     11 	replaced with path separators '/'.
     12 
     13 HARE.$MOD.VERSION
     14 	Sets the module version to reference for given module $MOD. For example,
     15 	to specify the version of the 'io' module to link to, set
     16 	HARE.io.VERSION=da39a3ee5e6b4b0d3255bfef95601890afd80709. Replace
     17 	namespace delimiters '::' with '.' to form the variable name. In this
     18 	example, harec will read
     19 	$HARECACHE/io/da39a3ee5e6b4b0d3255bfef95601890afd80709.td to obtain the
     20 	type definitions for the 'io' module.
     21 
     22 	If this variable is not found, the module's name is used as the version,
     23 	with the namespace delimiters '::' replaced with '.'.
     24 
     25 HA_STAGE
     26 	Causes harec to terminate after the given stage completes. If set, the
     27 	value must be "lex", "parse", "check", "gen", or "emit" (the default).