Skip to content

Commit

Permalink
chore(wrap-rust): update with latest polywrap-wasm-rs and use `Byte…
Browse files Browse the repository at this point in the history
…Buf` (#101)

* chore: update wrap rust with latest polywrap wasm rs

* chore: export only needed types from wasm_rs

* chore: update tests & fix style in template

* chore: update templates with serde bytes

* chore(wrap-rust): use `ByteBuf` for bytes

* chore: fix ci

* chore: ignore build folder
  • Loading branch information
cbrzn authored Sep 11, 2023
1 parent 3baccc3 commit b94d221
Show file tree
Hide file tree
Showing 42 changed files with 266 additions and 318 deletions.
3 changes: 2 additions & 1 deletion implementations/wrap-rust/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ node_modules
target
workflows/output.json
wrap
debug
debug
build
104 changes: 52 additions & 52 deletions implementations/wrap-rust/Cargo.lock

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

4 changes: 2 additions & 2 deletions implementations/wrap-rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ license = "MIT"
edition = "2021"

[dependencies]
polywrap-wasm-rs = { version = "~0.11.2" }
polywrap_msgpack_serde = { version = "0.0.2-beta.7" }
polywrap-wasm-rs = { version = "0.11.4" }
polywrap_msgpack_serde = "0.0.2-beta.7"
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0.99" }
handlebars = { version = "4.3.7" }
Expand Down
4 changes: 2 additions & 2 deletions implementations/wrap-rust/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
},
"devDependencies": {
"@types/jest": "26.0.8",
"@polywrap/schema-parse": "~0.11.2",
"@polywrap/schema-parse": "0.11.3",
"jest": "26.6.3",
"jest-diff": "26.6.2",
"polywrap": "~0.11.2",
"polywrap": "0.11.3",
"ts-jest": "26.5.4",
"typescript": "4.9.5"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
use serde::{Serialize, Deserialize};
use polywrap_msgpack_serde::{
wrappers::polywrap_json::JSONString,
wrappers::polywrap_bigint::BigIntWrapper
};
use polywrap_wasm_rs::{
BigInt,
BigNumber,
Map,
JSON
JSON,
JSONString,
BigIntWrapper,
ByteBuf
};

#[derive(Clone, Debug, Deserialize, Serialize)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
use serde::{Serialize, Deserialize};
use polywrap_msgpack_serde::{
wrappers::polywrap_json::JSONString,
wrappers::polywrap_bigint::BigIntWrapper
};
use polywrap_wasm_rs::{
BigInt,
BigNumber,
Map,
JSON
JSON,
JSONString,
BigIntWrapper,
ByteBuf
};
use crate::CustomType;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
use serde::{Serialize, Deserialize};
use polywrap_msgpack_serde::{
wrappers::polywrap_json::JSONString,
wrappers::polywrap_bigint::BigIntWrapper
};
use polywrap_wasm_rs::{
BigInt,
BigNumber,
Map,
JSON
JSON,
JSONString,
BigIntWrapper,
ByteBuf
};

#[derive(Clone, Debug, Deserialize, Serialize)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
use serde::{Serialize, Deserialize};
use polywrap_msgpack_serde::{
wrappers::polywrap_json::JSONString,
wrappers::polywrap_bigint::BigIntWrapper
};
use polywrap_wasm_rs::{
BigInt,
BigNumber,
Map,
JSON
JSON,
JSONString,
BigIntWrapper,
ByteBuf
};
use crate::AnotherType;
use crate::CustomEnum;
Expand Down Expand Up @@ -37,11 +36,9 @@ pub struct CustomType {
pub json: JSONString,
#[serde(rename = "optJson")]
pub opt_json: Option<JSONString>,
#[serde(with = "serde_bytes")]
pub bytes: Vec<u8>,
#[serde(with = "serde_bytes")]
pub bytes: ByteBuf,
#[serde(rename = "optBytes")]
pub opt_bytes: Option<Vec<u8>>,
pub opt_bytes: Option<ByteBuf>,
pub boolean: bool,
#[serde(rename = "optBoolean")]
pub opt_boolean: Option<bool>,
Expand Down
Loading

0 comments on commit b94d221

Please sign in to comment.