pub struct CompileOptions {Show 15 fields
pub include_paths: Vec<String>,
pub defines: Vec<(String, String)>,
pub undefines: Vec<String>,
pub default_charset: Option<String>,
pub timestamp: [u8; 24],
pub source_text_group: bool,
pub module_names: Vec<(String, usize)>,
pub from_library: Vec<bool>,
pub imports: Vec<(String, Option<String>)>,
pub text_tags: Vec<String>,
pub object_tags: Vec<String>,
pub object_keys: Vec<String>,
pub ifid: Option<String>,
pub debug: bool,
pub line_records: bool,
}Expand description
What to compile, and how.
Fields§
§include_paths: Vec<String>Directories to look in for included files.
defines: Vec<(String, String)>Macros to define before the source is read: name and expansion.
undefines: Vec<String>Macros to remove before the source is read.
default_charset: Option<String>The character set of source files that do not say what they are in. Without one, they are taken to be UTF-8.
timestamp: [u8; 24]When the program is compiled, as the 24 characters the image
records (Thu Nov 19 09:24:12 2026). The compiler has no clock
of its own.
source_text_group: boolObjects say which source file they are in from the start of each
file (--source-text-groups), as #pragma sourceTextGroup(on) makes them.
module_names: Vec<(String, usize)>For each source, the name its source text group gives it and its place among the modules of the build, from 1. Without them, a source is named as it is given, and numbered by its place in the list.
from_library: Vec<bool>For each source, whether a library brought it in. A game’s own
Hexicon sources are checked for properties given values that
nothing reads (see [crate::names]); a library’s are not.
Without them, no source is a library’s.
imports: Vec<(String, Option<String>)>The libraries a Hexicon source can import (import hexad;): each
by name, with its header, or none if it names none.
The tags the libraries’ output filters read in a game’s text, as
their manifests list them: with any, a tag in a game’s own source
that nothing defines is warned of (see [crate::tags]).
The tags whose argument names an object, as the libraries’
manifests list them: a name in such a tag that is no object’s is
an error in a game’s own source (see [crate::tags]).
object_keys: Vec<String>Where a key is an object, as the libraries’ manifests list them: a string there is an error in a game’s own source.
ifid: Option<String>The property a game gives its IFID in, as a library’s manifest
names it: with one, a game whose own sources give no IFID there,
or one that is not an IFID, is warned of (see crate::ifid).
debug: boolCompile for debugging (-d): __DEBUG is defined, and the image
has what a debugger needs: the global symbols, the macros, and
the address of each line’s code.
line_records: boolThe image says where in the source each statement’s code came from, so that a run-time error can say where it happened. On by default, and always when compiling for debugging; off only where the code alone matters, as in tests that two sources compile to the same image.