Skip to content

Commit

Permalink
internal: Move example WASM plugin to another Cargo workspace. (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
milesj authored Jul 7, 2023
1 parent b27cc35 commit e35228e
Show file tree
Hide file tree
Showing 9 changed files with 249 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ jobs:
- uses: moonrepo/setup-rust@v0
with:
bins: cargo-wasi, cargo-nextest
- run: cargo wasi build -p proto_wasm_test
- run: cargo nextest run --workspace --exclude proto_wasm_test
- run: cd plugins && cargo wasi build -p proto_wasm_test
- run: cargo nextest run --workspace
run:
name: Run
runs-on: ${{ matrix.os }}
Expand All @@ -61,7 +61,7 @@ jobs:
- uses: moonrepo/setup-rust@v0
with:
bins: cargo-wasi
- run: cargo wasi build -p proto_wasm_test --release
- run: cd plugins && cargo wasi build -p proto_wasm_test
- run: cargo run -- --help
- run: cargo run -- list-remote node
- run: cargo run -- list-remote wasm-test
4 changes: 2 additions & 2 deletions .prototools
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[plugins]
moon-test = "source:https://raw.githubusercontent.com/moonrepo/moon/master/proto-plugin.toml"
# wasm-test = "source:./target/wasm32-wasi/debug/proto_wasm_test.wasm"
wasm-test = "source:./target/wasm32-wasi/release/proto_wasm_test.wasm"
wasm-test = "source:./plugins/target/wasm32-wasi/debug/proto_wasm_test.wasm"
# wasm-test = "source:./plugins/target/wasm32-wasi/release/proto_wasm_test.wasm"
9 changes: 0 additions & 9 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion crates/wasm-plugin/tests/wasm_plugin_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ static mut LOGGING: bool = false;

fn create_plugin(dir: &Path) -> WasmPlugin {
let wasm_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"))
.join("../../target/wasm32-wasi/debug")
.join("../../plugins/target/wasm32-wasi/debug")
.canonicalize()
.unwrap();

Expand Down
235 changes: 235 additions & 0 deletions plugins/Cargo.lock

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

7 changes: 7 additions & 0 deletions plugins/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[workspace]
resolver = "2"
members = ["wasm-test"]

[workspace.dependencies]
extism-pdk = "0.3.3"
serde = { version = "1.0.167", features = ["derive"] }
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ publish = false
crate-type = ['cdylib']

[dependencies]
proto_pdk = { version = "0.2.0", path = "../pdk" }
proto_pdk = { path = "../../crates/pdk" }
extism-pdk = { workspace = true }
serde = { workspace = true }
File renamed without changes.
File renamed without changes.

0 comments on commit e35228e

Please sign in to comment.