pub struct BundleCapabilities {
pub mcp: bool,
pub async_rt: bool,
pub http_fetch: bool,
pub modules: bool,
}Expand description
The resolved per-app capability set for a static --bundle, produced by
merging explicit [capabilities] / [runtime] config with a conservative
source scan, then mapped to the cargo --features list the trimmed runtime
seam is built with.
CONSERVATIVE CONTRACT (mirrors [crate::run::subsystems::SubsystemUsage]):
a capability is inferred OFF only on a reliable unused signal; anything
ambiguous (a marker present, an unreadable dir) forces it ON. Explicit
config always overrides inference.
Fields§
§mcp: boolMCP introspection server present.
async_rt: boolAsync (tokio) bridge present.
http_fetch: boolScripts’ HTTP fetch() builtin present.
modules: boolRuntime-module loader present. Follows [dependencies] and the app’s
scripts: any declared module keeps it, and so does a script, since the
host that runs it is a module. A build without the loader would drop the
modules in silence rather than with the load banner.
Implementations§
Source§impl BundleCapabilities
impl BundleCapabilities
Sourcepub fn resolve(dir: &Path, cfg: &LumenToml) -> Self
pub fn resolve(dir: &Path, cfg: &LumenToml) -> Self
Resolve the capability set for the app rooted at dir from cfg plus a
bounded source scan. Explicit [capabilities] wins, then inference.
Sourcepub fn to_features(&self) -> Vec<String>
pub fn to_features(&self) -> Vec<String>
The cargo --features list to compile the trimmed runtime seam with,
passed after --no-default-features. runtime-parse is intentionally
omitted: a --bundle runs from a precompiled AOT artifact, so the
source parser is dropped too.
Trait Implementations§
Source§impl Clone for BundleCapabilities
impl Clone for BundleCapabilities
Source§fn clone(&self) -> BundleCapabilities
fn clone(&self) -> BundleCapabilities
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BundleCapabilities
impl Debug for BundleCapabilities
Source§impl PartialEq for BundleCapabilities
impl PartialEq for BundleCapabilities
Source§fn eq(&self, other: &BundleCapabilities) -> bool
fn eq(&self, other: &BundleCapabilities) -> bool
self and other values to be equal, and is used by ==.impl Eq for BundleCapabilities
impl StructuralPartialEq for BundleCapabilities
Auto Trait Implementations§
impl Freeze for BundleCapabilities
impl RefUnwindSafe for BundleCapabilities
impl Send for BundleCapabilities
impl Sync for BundleCapabilities
impl Unpin for BundleCapabilities
impl UnsafeUnpin for BundleCapabilities
impl UnwindSafe for BundleCapabilities
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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> DynEq for T
impl<T> DynEq for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§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