pub struct CompileOptions {
pub circuits: bool,
pub texlabels: bool,
pub base: Option<PathBuf>,
pub includes: IncludePolicy,
pub max_animation_seconds: Option<f64>,
pub max_animation_repeat: Option<i64>,
pub max_loop_iterations: Option<u64>,
pub max_shapes: Option<usize>,
}Expand description
Compile options for the *_with_options entry points — the library
equivalents of the CLI flags. Preludes (circuits, texlabels) are lexed
as their own named source units, NOT glued in front of the user’s source,
so diagnostic positions always stay relative to the source they belong to
(Diagnostic::file names an include/library; None is the user’s input).
Fields§
§circuits: boolLoad the embedded circuit-element library (the -c flag).
texlabels: boolInject texlabels = 1 as an initializer (the -t flag); the source
can still override it.
base: Option<PathBuf>Resolve copy "file" includes relative to this directory.
includes: IncludePolicyPolicy for copy "file" filesystem includes — leave the default
(Unrestricted, the CLI behavior) for local use; embedders compiling
untrusted source should pick SandboxedToBase or Deny.
max_animation_seconds: Option<f64>Host ceiling for animation times in seconds. None uses the library
default; the source-level maxanimseconds variable may lower this, but
cannot raise it.
max_animation_repeat: Option<i64>Host ceiling for finite GSAP repeat counts. None uses the library
default; repeat -1 remains the explicit infinite-repeat sentinel. The
source-level maxanimrepeat variable may lower this, but cannot raise it.
max_loop_iterations: Option<u64>Host ceiling for evaluated for loop iterations. None uses the
library default. Set this lower for untrusted source.
max_shapes: Option<usize>Host ceiling for emitted drawing shapes. None uses the library
default. Set this lower for untrusted source.
Trait Implementations§
Source§impl Clone for CompileOptions
impl Clone for CompileOptions
Source§fn clone(&self) -> CompileOptions
fn clone(&self) -> CompileOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more