|
4 | 4 | anyhow::{anyhow, bail, ensure, Context, Error, Result}, |
5 | 5 | async_trait::async_trait, |
6 | 6 | bytes::Bytes, |
7 | | - component_init::Invoker, |
| 7 | + component_init_transform::Invoker, |
8 | 8 | futures::future::FutureExt, |
9 | 9 | heck::ToSnakeCase, |
10 | 10 | indexmap::{IndexMap, IndexSet}, |
|
22 | 22 | Config, Engine, Store, |
23 | 23 | }, |
24 | 24 | wasmtime_wasi::{ |
25 | | - pipe::{MemoryInputPipe, MemoryOutputPipe}, |
26 | | - DirPerms, FilePerms, IoView, WasiCtx, WasiCtxBuilder, WasiView, |
| 25 | + p2::{ |
| 26 | + pipe::{MemoryInputPipe, MemoryOutputPipe}, |
| 27 | + IoView, WasiCtx, WasiCtxBuilder, WasiView, |
| 28 | + }, |
| 29 | + DirPerms, FilePerms, |
27 | 30 | }, |
28 | 31 | wit_parser::{Resolve, TypeDefKind, UnresolvedPackageGroup, WorldId, WorldItem, WorldKey}, |
29 | 32 | }; |
@@ -348,9 +351,10 @@ pub async fn componentize( |
348 | 351 | None |
349 | 352 | }; |
350 | 353 |
|
351 | | - // Pre-initialize the component by running it through `component_init::initialize`. Currently, this is the |
352 | | - // application's first and only chance to load any standard or third-party modules since we do not yet include |
353 | | - // a virtual filesystem in the component to make those modules available at runtime. |
| 354 | + // Pre-initialize the component by running it through `component_init_transform::initialize`. |
| 355 | + // Currently, this is the application's first and only chance to load any standard or |
| 356 | + // third-party modules since we do not yet include a virtual filesystem in the component to |
| 357 | + // make those modules available at runtime. |
354 | 358 |
|
355 | 359 | let stdout = MemoryOutputPipe::new(10000); |
356 | 360 | let stderr = MemoryOutputPipe::new(10000); |
@@ -511,7 +515,7 @@ pub async fn componentize( |
511 | 515 | let mut store = Store::new(&engine, Ctx { wasi, table }); |
512 | 516 |
|
513 | 517 | let app_name = app_name.to_owned(); |
514 | | - let component = component_init::initialize_staged( |
| 518 | + let component = component_init_transform::initialize_staged( |
515 | 519 | &component, |
516 | 520 | stubbed_component |
517 | 521 | .as_ref() |
@@ -585,7 +589,7 @@ fn add_wasi_and_stubs( |
585 | 589 | worlds: &IndexSet<WorldId>, |
586 | 590 | linker: &mut Linker<Ctx>, |
587 | 591 | ) -> Result<()> { |
588 | | - wasmtime_wasi::add_to_linker_async(linker)?; |
| 592 | + wasmtime_wasi::p2::add_to_linker_async(linker)?; |
589 | 593 |
|
590 | 594 | enum Stub<'a> { |
591 | 595 | Function(&'a String), |
|
0 commit comments