pub async fn create_store(
engine: &Engine,
preopens: &[Preopen],
grant_policy: &GrantPolicy,
info: &ComponentInfo,
max_memory: Option<usize>,
prompter: Arc<dyn ConsentPrompter>,
cache: Arc<DecisionCache>,
credentials: Option<Arc<CredentialHost>>,
component_ref: &str,
) -> Result<(Store<HostState>, Vec<(String, Arc<dyn CompiledCeiling>)>)>Expand description
Create a new store with WASI context, preopening directories from resolved mounts.
grant_policy is intersected with the component’s declared capabilities via
ProviderRegistry::with_builtins(). Undeclared capability classes are always
denied regardless of the grant.
component_ref is the reference the operator supplied, carried into host
state so a consent prompt can name the artifact that is asking. It is a
parameter rather than a field of info on purpose: info is the guest’s
own manifest, and ACT-CONSENT.md §5 forbids attributing the question to a
name the guest chose.