Skip to main content

CompileOptions

Struct CompileOptions 

Source
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: bool

Objects 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.

§text_tags: Vec<String>

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]).

§object_tags: Vec<String>

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: bool

Compile 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: bool

The 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.

Trait Implementations§

Source§

impl Clone for CompileOptions

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CompileOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for CompileOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.