Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-wasip2
- name: Format
run: cargo fmt --all -- --check
- name: Docs
Expand Down
20 changes: 10 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 3 additions & 14 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[workspace]
members = ["cli", "wasmtime", "test-programs", "test-programs/artifacts"]
members = ["cli", "transform", "wasmtime", "test-programs", "test-programs/artifacts"]
resolver = "3"

[workspace.package]
version = "0.1.0"
Expand All @@ -9,7 +10,7 @@ edition = "2024"
anyhow = "1.0.89"
async-trait = "0.1.83"
clap = { version = "4", features = ["derive"] }
component-init = { path = "." }
component-init-transform = { path = "./transform" }
component-init-wasmtime = { path = "./wasmtime" }
futures = "0.3.31"
test-programs = { path = "./test-programs" }
Expand All @@ -22,15 +23,3 @@ wasmtime-wasi = "34.0.1"
wasmtime-wasi-http = "34.0.1"
wat = "1.235.0"
wit-bindgen = "0.43.0"

[package]
name = "component-init"
version.workspace = true
edition.workspace = true

[dependencies]
anyhow.workspace = true
async-trait.workspace = true
futures.workspace = true
wasm-encoder.workspace = true
wasmparser.workspace = true
11 changes: 11 additions & 0 deletions transform/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[package]
name = "component-init-transform"
version.workspace = true
edition.workspace = true

[dependencies]
anyhow.workspace = true
async-trait.workspace = true
futures.workspace = true
wasm-encoder.workspace = true
wasmparser.workspace = true
File renamed without changes.
2 changes: 1 addition & 1 deletion wasmtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition.workspace = true
[dependencies]
anyhow.workspace = true
async-trait.workspace = true
component-init.workspace = true
component-init-transform.workspace = true
wasmtime.workspace = true

[dev-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions wasmtime/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use anyhow::{Context, Result, anyhow};
use component_init::Invoker;
use component_init_transform::Invoker;
use wasmtime::{
Config, Engine, Store,
component::{Component, ComponentNamedList, Instance, Lift, Linker},
};

pub async fn initialize(component: &[u8]) -> Result<Vec<u8>> {
component_init::initialize(component, |instrumented| {
component_init_transform::initialize(component, |instrumented| {
Box::pin(async move {
let i = invoker(instrumented)
.await
Expand Down
Loading