Skip to main content

Embedder

Struct Embedder 

Source
pub struct Embedder {
Show 18 fields pub name: &'static str, pub display_name: &'static str, pub vendor: Option<&'static str>, pub version: &'static str, pub user_agent: &'static str, pub self_names: &'static [&'static str], pub compatible_names: &'static [&'static str], pub lockfile_basename: &'static str, pub workspace_yaml: Option<&'static str>, pub manifest_namespace: &'static str, pub env_prefix: Option<&'static str>, pub config_env_prefix: Option<&'static str>, pub cache_namespace: &'static str, pub data_namespace: &'static str, pub canonical_lockfile_always_wins: bool, pub runtime_switching: bool, pub self_engines_check: bool, pub self_update_enabled: bool,
}
Expand description

The binary’s embedder profile — branding plus embedder-fixed behavior.

Branding fields are pure naming constants. The behavior toggles (canonical_lockfile_always_wins, runtime_switching, self_engines_check, self_update_enabled) are embedder-fixed, not user-tunable: a host that mirrors the project’s incumbent package manager, owns Node provisioning, lives outside aube’s version namespace, or owns its own self-update flips them. Genuinely user-tunable knobs stay settings.

Fields§

§name: &'static str

Tool name, lowercase (e.g. "aube"). The proper noun users type and see in output, and the clap command name driving help/usage/errors. Must be filesystem- and command-safe (no spaces, slashes, or shell metacharacters); it is used verbatim in on-disk sidecar paths (e.g. .<name>_patch_state.json, .<name>-deploy-injected/) and in command invocations, so the embedder is responsible for supplying a safe slug.

§display_name: &'static str

High-visibility display name shown in the progress banner (e.g. "aube"). Usually equal to name; split out so an embedder can brand the banner independently of the command name.

§vendor: Option<&'static str>

Vendor attribution rendered after the version in the progress banner, e.g. Some("by jdx.dev"). None suppresses the attribution entirely (an embedder that doesn’t want a third-party vendor tag).

§version: &'static str

Version string — env!("CARGO_PKG_VERSION") for standalone aube.

§user_agent: &'static str

HTTP User-Agent product token, e.g. "aube/1.19.0". Sent to the registry and exported as the lifecycle npm_config_user_agent product.

§self_names: &'static [&'static str]

Names this tool recognizes as itself in a packageManager field or a lockfile-kind detection. Standalone aube: ["aube"].

§compatible_names: &'static [&'static str]

Names accepted as compatible drop-in targets in the packageManager guardrail. Standalone aube: ["pnpm"].

§lockfile_basename: &'static str

Canonical lockfile filename, e.g. "aube-lock.yaml".

Invariant (checked in set_embedder): must contain a . (so the stem/extension split the lockfile-candidate machinery relies on holds) and must not collide with a foreign package manager’s lockfile name (pnpm-lock.yaml, package-lock.json, bun.lock, yarn.lock, npm-shrinkwrap.json). Aliasing a foreign name would make aube’s own lockfile indistinguishable from the incumbent’s in the lockfile-candidate set (io.rs / clean.rs / pack.rs).

§workspace_yaml: Option<&'static str>

The branded workspace-config YAML this tool reads and writes, e.g. "aube-workspace.yaml". None disables the tool’s own branded YAML entirely (the shared pnpm-workspace.yaml compatibility surface is handled separately and is not configured here).

§manifest_namespace: &'static str

The package.json object key this tool reads its own config under, e.g. "aube". "" means this tool has no own branded manifest namespace: config reads fold only the compatible_names namespaces plus any top-level (manifest-root) entry, and setting writes go to the manifest root as top-level package.json keys — never under a foreign brand’s namespace, and never as a literal "" key.

§env_prefix: Option<&'static str>

Env-var prefix for the tool’s internal debug / diagnostic / perf-bisect toggles, read through embedder_env, e.g. Some("AUBE")AUBE_DISABLE_CLONEDIR, AUBE_DIAG_PRINT, … None means the tool exposes no branded debug-toggle family — every such toggle is simply unreadable, so an embedding host’s brand never sprouts a dozen <HOST>_DISABLE_* perf switches. This gates the non-settings, non-user-facing toggle family only; the few user-facing config knobs go through config_env_prefix, and the settings table’s branded aliases go through branded_env_alias_enabled.

§config_env_prefix: Option<&'static str>

Env-var prefix for the tool’s small set of first-class config knobs — the cache dir and the fetch concurrency — read through config_env, e.g. Some("AUBE")AUBE_CACHE_DIR / AUBE_CONCURRENCY, Some("NUB")NUB_CACHE_DIR / NUB_CONCURRENCY. Distinct from env_prefix: these few knobs ARE legitimate config the host wants under its own brand, whereas the debug toggles vanish under an embedder that hides them. None reads no first-class config env.

§cache_namespace: &'static str

Leaf directory name under the OS cache root, e.g. "aube"<XDG_CACHE_HOME>/aube.

§data_namespace: &'static str

Leaf directory name under the OS data/state root, e.g. "aube".

§canonical_lockfile_always_wins: bool

When true (aube’s default), this tool’s canonical lockfile (lockfile_basename) outranks any foreign lockfile present in lockfile-kind detection. An embedder that mirrors the project’s incumbent package manager sets this false so the incumbent’s lockfile wins instead. Embedder-fixed: it’s the host’s call, not the user’s.

§runtime_switching: bool

When true (aube’s default), this tool resolves and switches the Node runtime from version files / devEngines and prepends it to PATH. An embedder that owns Node provisioning itself sets this false, leaving the runtime resolver inert. Embedder-fixed.

§self_engines_check: bool

When true (aube’s default), this tool validates a manifest’s engines.<self> constraint against its own version. An embedder whose version isn’t in aube’s version namespace sets this false to avoid spurious engines.aube mismatches. The engines.node check is unaffected. Embedder-fixed.

§self_update_enabled: bool

When true (aube’s default), this tool owns its own self-update: the update notifier (and its aube.jdx.dev endpoints) runs. An embedder that owns its own upgrade path sets this false so those code paths never run. Embedder-fixed.

Trait Implementations§

Source§

impl Clone for Embedder

Source§

fn clone(&self) -> Embedder

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 Copy for Embedder

Source§

impl Debug for Embedder

Source§

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

Formats the value using the given formatter. 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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more