Skip to content

Commit

Permalink
Reworking directory structure
Browse files Browse the repository at this point in the history
  • Loading branch information
andrzejressel committed Jul 14, 2024
1 parent a3cba15 commit 2cca9ad
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 17 deletions.
2 changes: 2 additions & 0 deletions Cargo.lock

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

19 changes: 11 additions & 8 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,17 @@ regenerate-providers:
# DO NOT EDIT - REGENERATE-PROVIDERS - END

publish:
cargo publish -p pulumi_wasm_common --allow-dirty
cargo publish -p pulumi_wasm_rust_macro --allow-dirty
cargo publish -p pulumi_wasm_rust --allow-dirty
cargo publish -p pulumi_wasm_generator_lib --allow-dirty
cargo publish -p pulumi_wasm_generator --allow-dirty
cargo publish -p pulumi_wasm_core --allow-dirty
cargo publish -p pulumi_wasm_docker --allow-dirty
cargo publish -p pulumi_wasm_random --allow-dirty
cargo publish -p pulumi_wasm_wit --allow-dirty --all-features
cargo publish -p pulumi_wasm_proto --allow-dirty --all-features
cargo publish -p pulumi_wasm_common --allow-dirty --all-features
cargo publish -p pulumi_wasm_rust_macro --allow-dirty --all-features
cargo publish -p pulumi_wasm_rust --allow-dirty --all-features
cargo publish -p pulumi_wasm_generator_lib --allow-dirty --all-features
cargo publish -p pulumi_wasm_generator --allow-dirty --all-features
cargo publish -p pulumi_wasm_core --allow-dirty --all-features
cargo publish -p pulumi_wasm_docker --allow-dirty --all-features
cargo publish -p pulumi_wasm_random --allow-dirty --all-features
cargo publish -p pulumi_wasm_runner --allow-dirty --all-features

test:
cargo nextest run --workspace --timings
Expand Down
1 change: 1 addition & 0 deletions pulumi_wasm_runner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ log4rs.workspace = true
clap.workspace = true
wac-graph.workspace = true
pulumi_wasm_proto = { workspace = true, features = ["connectivity"] }
pulumi_wasm_wit = { workspace = true, features = ["server"] }
10 changes: 1 addition & 9 deletions pulumi_wasm_runner/src/pulumi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,14 @@ use crate::pulumi::server::component::pulumi_wasm::external_world::Host;
use crate::pulumi::server::component::pulumi_wasm::external_world::RegisteredResource;
use crate::pulumi::server::Main;
use crate::pulumi_state::PulumiState;
use pulumi_wasm_wit::bindings_server as server;

pub struct Pulumi {
plugin: Main,
_instance: Instance,
store: Store<SimplePluginCtx>,
}

pub(crate) mod server {
wasmtime::component::bindgen!({
path: "../wits/world.wit",
world: "main",
async: true,
trappable_imports: true,
});
}

struct SimplePluginCtx {
table: ResourceTable,
context: WasiCtx,
Expand Down
2 changes: 2 additions & 0 deletions pulumi_wasm_wit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ edition.workspace = true
[features]
pulumi-wasm-rust = []
logger = []
server = ["dep:wasmtime"]

[dependencies]
wit-bindgen.workspace = true
wasmtime = { workspace = true, optional = true }
13 changes: 13 additions & 0 deletions pulumi_wasm_wit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,16 @@ pub mod bindings_logger {
world: "logger",
});
}

#[allow(clippy::all)]
#[allow(dead_code)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[cfg(feature = "server")]
pub mod bindings_server {
wasmtime::component::bindgen!({
world: "main",
async: true,
trappable_imports: true,
});
}

0 comments on commit 2cca9ad

Please sign in to comment.