Skip to content

Commit

Permalink
fixed rust plugin template test
Browse files Browse the repository at this point in the history
  • Loading branch information
krisbitney committed Oct 27, 2023
1 parent d417782 commit 49b89ca
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 17 deletions.
8 changes: 4 additions & 4 deletions packages/templates/plugin/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ include = [
]

[dependencies]
polywrap_core = { version = "~0.1.8" }
polywrap_plugin = { version = "~0.1.8" }
polywrap_core = { version = "~0.1.9-beta.2" }
polywrap_plugin = { version = "~0.1.9-beta.2" }
polywrap_msgpack_serde = { version = "~0.0.2-beta.7" }
wrap_manifest_schemas = { version = "~0.1.8" }
wrap_manifest_schemas = { version = "~0.1.9-beta.2" }
serde = {version = "1.0.145", features = ["derive"]}

[dev-dependencies]
polywrap_client = { version = "~0.1.8" }
polywrap_client = { version = "~0.1.9-beta.2" }
19 changes: 7 additions & 12 deletions packages/templates/plugin/rust/tests/e2e.rs
Original file line number Diff line number Diff line change
@@ -1,30 +1,25 @@
use template_plugin_rs::SamplePlugin;
use template_plugin_rs::wrap::module::ArgsSampleMethod;
use polywrap_core::{
client::ClientConfig,
uri::Uri,
};
use polywrap_core::uri::Uri;
use polywrap_plugin::{package::PluginPackage};
use polywrap_client::{
client::PolywrapClient,
builder::{PolywrapClientConfig, PolywrapClientConfigBuilder},
client::Client,
builder::{ClientConfig, ClientConfigBuilder},
};
use polywrap_msgpack_serde::to_vec;
use std::{
sync::{Arc, Mutex},
};
use std::sync::Arc;

fn get_client() -> PolywrapClient {
fn get_client() -> Client {
let sample_plugin = SamplePlugin {};
let plugin_pkg = PluginPackage::<SamplePlugin>::from(sample_plugin);

let mut config = PolywrapClientConfig::new();
let mut config = ClientConfig::new();
config.add_package(
Uri::try_from("plugin/sample").unwrap(),
Arc::new(plugin_pkg)
);

PolywrapClient::new(config.into())
Client::new(config.into())
}

#[test]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ format: 0.3.0
strategies:
image:
name: wrap-wasm-as-build-image
node_version: 16.13.0
node_version: 18.15.0
include:
- ./package.json
- ./src
Expand Down

0 comments on commit 49b89ca

Please sign in to comment.