pub struct CompileOptions {
pub source_dir: Option<PathBuf>,
pub lib_paths: Vec<PathBuf>,
pub required_outputs: Vec<String>,
pub strict: bool,
pub context: String,
pub cursor_limit: Option<u64>,
pub ledger: Option<Arc<CompileLedger>>,
pub engine: Engine,
}Expand description
The options every entry point compiles under. A host that names none gets the defaults: no source directory, no library paths, every binding an output, lax typing, the default context label, no cursor limit, and the most compiled engine this build has.
strict refuses what lax compilation warns about, on every engine:
an implicit type coercion, a config wire fed from a cycle-time
source, a nondeterministic node no volatile output acknowledges, a
binding nothing reads, an undeclared coordinate, and a positional
module argument.
engine is a preference, and the only place a caller expresses
one. Leaving it alone is the normative path: Engine::default is
the most native form the build offers (native code with the jit
feature, the closure tier without), so a host that never mentions
the field still gets compiled code, and gets faster code for free
when a build gains a tier. Naming an engine is for testing,
measurement, and demonstration — a differential test that wants the
interpreter as the reference, a bench that walks the tiers. A
preference the build cannot realize is refused
(crate::KernelError::Refused) rather than silently replaced, and
every kernel reports what it actually runs through
crate::Kernel::engine.
Fields§
§source_dir: Option<PathBuf>The directory relative data-file paths resolve against.
lib_paths: Vec<PathBuf>Library search paths, tried after the source directory and before the embedded standard library.
required_outputs: Vec<String>The outputs to keep; every output when empty.
strict: boolWhether to enforce strict validation.
context: StringThe diagnostic context label, such as a file name.
cursor_limit: Option<u64>A limit on every cursor’s extent, if any.
ledger: Option<Arc<CompileLedger>>The compile ledger to record this program tree in: a host that
holds one charges the compile to it; None mints a fresh one,
read back through the kernel’s ledger().
engine: EngineThe engine to build on. Defaults to Engine::default, the
most native form this build has; see the type’s documentation
for when to set it and what happens when it cannot be realized.
Trait Implementations§
Source§impl Clone for CompileOptions
impl Clone for CompileOptions
Source§impl Debug for CompileOptions
impl Debug for CompileOptions
Auto Trait Implementations§
impl Freeze for CompileOptions
impl RefUnwindSafe for CompileOptions
impl Send for CompileOptions
impl Sync for CompileOptions
impl Unpin for CompileOptions
impl UnsafeUnpin for CompileOptions
impl UnwindSafe for CompileOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more