pub struct CompileDeps {
pub target: Target,
pub import_roots: Vec<(String, PathBuf)>,
pub addons: Vec<Addon>,
pub modules: ModuleSurface,
}Expand description
What a compile takes from outside the app directory: the target it builds
for, and what lumenc resolved for that target before it started.
The runtime resolves nothing itself, so a caller with no registry and no
add-on in reach passes CompileDeps::new and the compile reads the app
alone.
Fields§
§target: TargetThe target the program is compiled for: it decides which
[target.<name>.dependencies] table applies, and the names a script’s
compile-time conditions are true for
(lumen_modules::Target::cfg_flags).
import_roots: Vec<(String, PathBuf)>Script libraries the app imports, as the name a script imports under and the directory holding its sources.
addons: Vec<Addon>What the web halves of the modules the app depends on declare. A module’s descriptor is its script surface on every target, so their functions are declared to the compile and their elements to the parser whatever the target, and the compiled app carries them. The functions are declared here and bound, at run time, to whatever the loaded module registers.
modules: ModuleSurfaceWhat the modules with no web half register for scripts, read by
installing each the way a run does (module_surface). Empty for a
web build, which cannot take such a module.
Implementations§
Trait Implementations§
Source§impl Clone for CompileDeps
impl Clone for CompileDeps
Source§fn clone(&self) -> CompileDeps
fn clone(&self) -> CompileDeps
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for CompileDeps
impl !RefUnwindSafe for CompileDeps
impl Send for CompileDeps
impl Sync for CompileDeps
impl Unpin for CompileDeps
impl UnsafeUnpin for CompileDeps
impl !UnwindSafe for CompileDeps
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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