Skip to content

Commit 71c85a0

Browse files
committed
component-init was published as component-init-transform
1 parent 9d5e50d commit 71c85a0

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
lines changed

Cargo.lock

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pyo3 = { git = "https://github.com/dicej/pyo3", branch = "v0.25.0-no-wasm32-unwi
3131
wasmtime = "34.0.1"
3232
wasmtime-wasi = "34.0.1"
3333
once_cell = "1.20.2"
34-
component-init = { git = "https://github.com/pchickey/component-init", branch = "pch/wasmtime_and_cli" }
34+
component-init-transform = "0.1"
3535
async-trait = "0.1.83"
3636
futures = "0.3.31"
3737
tokio = { version = "1.41.0", features = [

src/lib.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use {
44
anyhow::{anyhow, bail, ensure, Context, Error, Result},
55
async_trait::async_trait,
66
bytes::Bytes,
7-
component_init::Invoker,
7+
component_init_transform::Invoker,
88
futures::future::FutureExt,
99
heck::ToSnakeCase,
1010
indexmap::{IndexMap, IndexSet},
@@ -351,9 +351,10 @@ pub async fn componentize(
351351
None
352352
};
353353

354-
// Pre-initialize the component by running it through `component_init::initialize`. Currently, this is the
355-
// application's first and only chance to load any standard or third-party modules since we do not yet include
356-
// 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.
357358

358359
let stdout = MemoryOutputPipe::new(10000);
359360
let stderr = MemoryOutputPipe::new(10000);
@@ -514,7 +515,7 @@ pub async fn componentize(
514515
let mut store = Store::new(&engine, Ctx { wasi, table });
515516

516517
let app_name = app_name.to_owned();
517-
let component = component_init::initialize_staged(
518+
let component = component_init_transform::initialize_staged(
518519
&component,
519520
stubbed_component
520521
.as_ref()

src/stubwasi.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ pub fn link_stub_modules(libraries: Vec<Library>) -> Result<LinkedStubModules, E
3636
// As of this writing, `wit_component::Linker` generates a component such that the first module is the
3737
// `main` one, followed by any adapters, followed by any libraries, followed by the `init` module, which is
3838
// finally followed by any shim modules. Given that the stubbed component may contain more adapters than
39-
// the non-stubbed version, we need to tell `component-init` how to translate module indexes from the
40-
// former to the latter.
39+
// the non-stubbed version, we need to tell `component-init-transform` how to translate module indexes from
40+
// the former to the latter.
4141
//
4242
// TODO: this is pretty fragile in that it could silently break if `wit_component::Linker`'s implementation
4343
// changes. Can we make it more robust?

0 commit comments

Comments
 (0)