Skip to content

Commit

Permalink
Reworking directory structure (#247)
Browse files Browse the repository at this point in the history
Closes #246
  • Loading branch information
andrzejressel committed Jul 20, 2024
1 parent f436782 commit 0a0b24c
Show file tree
Hide file tree
Showing 142 changed files with 655 additions and 4,236 deletions.
5 changes: 5 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[registries.cloudsmith]
index = "sparse+https://cargo.cloudsmith.io/andrzej-ressel-github/pulumi-wasm/"

[registry]
default = "cloudsmith"
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
length: 7
- name: Package language plugin
if: runner.os == 'Linux'
run: just package-language-plugin "0.1.0-${{ steps.short-sha.outputs.sha }}"
run: just package-language-plugin "0.0.0-${{ steps.short-sha.outputs.sha }}"
- uses: actions/upload-artifact@v4
if: runner.os == 'Linux'
with:
Expand All @@ -124,8 +124,8 @@ jobs:
- name: Release
uses: softprops/action-gh-release@v2.0.8
with:
name: 0.1.0-${{ steps.short-sha.outputs.sha }}
tag_name: v0.1.0-${{ steps.short-sha.outputs.sha }}
name: 0.0.0-${{ steps.short-sha.outputs.sha }}
tag_name: v0.0.0-${{ steps.short-sha.outputs.sha }}
fail_on_unmatched_files: true
prerelease: true
body: ""
Expand Down
81 changes: 49 additions & 32 deletions Cargo.lock

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

26 changes: 15 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,39 @@ members = [
"examples/docker",
"examples/multiple_providers",
"examples/simple",
# DO NOT EDIT - START
# DO NOT EDIT - START
"providers/pulumi_wasm_provider_docker",
"providers/pulumi_wasm_provider_docker_rust",
"providers/pulumi_wasm_provider_random",
"providers/pulumi_wasm_provider_random_rust",
# DO NOT EDIT - END
# DO NOT EDIT - END
"pulumi_wasm",
"pulumi_wasm_common",
"pulumi_wasm_core",
"pulumi_wasm_generator",
"pulumi_wasm_generator_lib",
"pulumi_wasm_proto",
"pulumi_wasm_runner",
"pulumi_wasm_rust",
"pulumi_wasm_rust_macro",
"pulumi_wasm_wit",
"regenerate_providers",
"wasm_common",
]

[workspace.package]
version = "0.1.0"
version = "0.0.0"
edition = "2021"

[workspace.dependencies]
pulumi_wasm_core = { path = "pulumi_wasm_core" }
pulumi_wasm_docker = { path = "providers/pulumi_wasm_provider_docker_rust" }
pulumi_wasm_generator_lib = { path = "pulumi_wasm_generator_lib" }
pulumi_wasm_random = { path = "providers/pulumi_wasm_provider_random_rust" }
pulumi_wasm_rust = { path = "pulumi_wasm_rust" }
pulumi_wasm_rust_macro = { path = "pulumi_wasm_rust_macro" }
wasm_common = { path = "wasm_common" }
pulumi_wasm_core = { version = "0.0.0", path = "pulumi_wasm_core", registry = "cloudsmith" }
pulumi_wasm_docker = { version = "4.5.3", path = "providers/pulumi_wasm_provider_docker_rust", registry = "cloudsmith" }
pulumi_wasm_generator_lib = { version = "0.0.0", path = "pulumi_wasm_generator_lib", registry = "cloudsmith" }
pulumi_wasm_random = { version = "4.15.0", path = "providers/pulumi_wasm_provider_random_rust", registry = "cloudsmith" }
pulumi_wasm_rust = { version = "0.0.0", path = "pulumi_wasm_rust", registry = "cloudsmith" }
pulumi_wasm_rust_macro = { version = "0.0.0", path = "pulumi_wasm_rust_macro", registry = "cloudsmith" }
pulumi_wasm_common = { version = "0.0.0", path = "pulumi_wasm_common", registry = "cloudsmith" }
pulumi_wasm_proto = { version = "0.0.0", path = "pulumi_wasm_proto", registry = "cloudsmith" }
pulumi_wasm_wit = { version = "0.0.0", path = "pulumi_wasm_wit", registry = "cloudsmith" }

anyhow = "1.0.82"
prost = "0.13.1"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Currently, supports very simple code for very simple providers (no complex objec
#### Language plugin

```
pulumi plugin install language wasm "0.1.0-SHORTSHA1" --server github://api.github.com/andrzejressel/pulumi-wasm
pulumi plugin install language wasm "0.0.0-SHORTSHA1" --server github://api.github.com/andrzejressel/pulumi-wasm
```
2 changes: 1 addition & 1 deletion docs/crates.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Main WASM component. Currently implements Output handling, send and handles requ
### Pulumi WASM runner

x64 application that runs the WASM component.
Implements `component:pulumi-wasm@0.1.0/external-world` and `component:pulumi-wasm@0.1.0/log` interfaces.
Implements `component:pulumi-wasm@0.0.0/external-world` and `component:pulumi-wasm@0.0.0/log` interfaces.

### Pulumi WASM Rust

Expand Down
24 changes: 19 additions & 5 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@ install-requirements:
cargo binstall --no-confirm cargo-nextest@{{NEXTEST_VERSION}} --force || cargo-nextest --version
cargo binstall --no-confirm cargo-component@{{CARGO_COMPONENT_VERSION}} --force || cargo-component --version

# Compiling everything together causes linking issues
build-wasm-components:
cargo component build -p pulumi_wasm \
-p pulumi_wasm_example_simple \
-p pulumi_wasm_example_docker \
-p pulumi_wasm_example_dependencies \
-p pulumi_wasm_example_multiple_providers --timings
cargo component build -p pulumi_wasm --timings
cargo component build -p pulumi_wasm_example_simple --timings
cargo component build -p pulumi_wasm_example_docker --timings
cargo component build -p pulumi_wasm_example_dependencies --timings
cargo component build -p pulumi_wasm_example_multiple_providers --timings
# DO NOT EDIT - BUILD-WASM-COMPONENTS - START
cargo component build \
-p pulumi_wasm_docker_provider \
Expand Down Expand Up @@ -60,6 +61,19 @@ regenerate-providers:
cargo run -p pulumi_wasm_generator -- gen-rust --remove true --schema providers/random.json --output providers/pulumi_wasm_provider_random_rust
# DO NOT EDIT - REGENERATE-PROVIDERS - END

publish:
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
2 changes: 1 addition & 1 deletion providers/pulumi_wasm_provider_docker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ crate-type = ["cdylib"]

[dependencies]
wit-bindgen-rt.workspace = true
wasm_common.workspace = true
pulumi_wasm_common.workspace = true

[package.metadata.component]
package = "pulumi:docker"
Expand Down
Loading

0 comments on commit 0a0b24c

Please sign in to comment.