File tree 1 file changed +11
-0
lines changed
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -265,6 +265,17 @@ impl Wasmtime {
265
265
Ok((Self::new(store, &instance)?, instance))
266
266
}}
267
267
268
+ /// Instantiates a pre-instantiated module using the specified
269
+ /// parameters, wrapping up the result in a structure that
270
+ /// translates between wasm and the host.
271
+ pub {async_} fn instantiate_pre<T {send}>(
272
+ mut store: impl wasmtime::AsContextMut<Data = T>,
273
+ instance_pre: &wasmtime::component::InstancePre<T>,
274
+ ) -> anyhow::Result<(Self, wasmtime::component::Instance)> {{
275
+ let instance = instance_pre.instantiate{async__}(&mut store){await_}?;
276
+ Ok((Self::new(store, &instance)?, instance))
277
+ }}
278
+
268
279
/// Low-level creation wrapper for wrapping up the exports
269
280
/// of the `instance` provided in this structure of wasm
270
281
/// exports.
You can’t perform that action at this time.
0 commit comments