diff --git a/implementations/wrap-rust/.gitignore b/implementations/wrap-rust/.gitignore index 20591e12..86f32b1e 100644 --- a/implementations/wrap-rust/.gitignore +++ b/implementations/wrap-rust/.gitignore @@ -3,4 +3,5 @@ node_modules target workflows/output.json wrap -debug \ No newline at end of file +debug +build \ No newline at end of file diff --git a/implementations/wrap-rust/Cargo.lock b/implementations/wrap-rust/Cargo.lock index b5fd55db..782a0679 100644 --- a/implementations/wrap-rust/Cargo.lock +++ b/implementations/wrap-rust/Cargo.lock @@ -43,9 +43,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "cpufeatures" -version = "0.2.7" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" dependencies = [ "libc", ] @@ -62,9 +62,9 @@ dependencies = [ [[package]] name = "digest" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", "crypto-common", @@ -82,9 +82,9 @@ dependencies = [ [[package]] name = "handlebars" -version = "4.3.7" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83c3372087601b532857d332f5957cbae686da52bb7810bf038c3e3c3cc2fa0d" +checksum = "c39b3bc2a8f715298032cf5087e58573809374b08160aa7d750582bdb82d2683" dependencies = [ "log", "pest", @@ -96,9 +96,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "lazy_static" @@ -108,24 +108,27 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.144" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "log" -version = "0.4.17" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" + +[[package]] +name = "memchr" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" [[package]] name = "num-bigint" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ "autocfg", "num-integer", @@ -145,34 +148,35 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", ] [[package]] name = "once_cell" -version = "1.17.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "pest" -version = "2.6.0" +version = "2.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e68e84bfb01f0507134eac1e9b410a12ba379d064eab48c50ba4ce329a527b70" +checksum = "d7a4d085fd991ac8d5b05a147b437791b4260b76326baf0fc60cf7c9c27ecd33" dependencies = [ + "memchr", "thiserror", "ucd-trie", ] [[package]] name = "pest_derive" -version = "2.6.0" +version = "2.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b79d4c71c865a25a4322296122e3924d30bc8ee0834c8bfc8b95f7f054afbfb" +checksum = "a2bee7be22ce7918f641a33f08e3f43388c7656772244e2bbb2477f44cc9021a" dependencies = [ "pest", "pest_generator", @@ -180,9 +184,9 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.6.0" +version = "2.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c435bf1076437b851ebc8edc3a18442796b30f1728ffea6262d59bbe28b077e" +checksum = "d1511785c5e98d79a05e8a6bc34b4ac2168a0e3e92161862030ad84daa223141" dependencies = [ "pest", "pest_meta", @@ -193,9 +197,9 @@ dependencies = [ [[package]] name = "pest_meta" -version = "2.6.0" +version = "2.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "745a452f8eb71e39ffd8ee32b3c5f51d03845f99786fa9b68db6ff509c505411" +checksum = "b42f0394d3123e33353ca5e1e89092e533d2cc490389f2bd6131c43c634ebc5f" dependencies = [ "once_cell", "pest", @@ -204,15 +208,12 @@ dependencies = [ [[package]] name = "polywrap-wasm-rs" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86a4242d00d30a6ed07a7f32cb18435c8c0e81cbfffacac5f046b025ca497d0a" +checksum = "819bb6e958130c56bc134782aaa78532629c5f85dc3d04a396490b85180f983c" dependencies = [ - "bigdecimal", "byteorder", - "num-bigint", - "num-traits", - "serde_json", + "polywrap_msgpack_serde", "thiserror", ] @@ -251,9 +252,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "serde" @@ -286,9 +287,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.99" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46266871c240a00b8f503b877622fe33430b3c7d963bdc0f2adc511e54a1eae3" +checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" dependencies = [ "itoa", "ryu", @@ -297,9 +298,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" dependencies = [ "cfg-if", "cpufeatures", @@ -308,9 +309,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.29" +version = "2.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" +checksum = "718fa2415bcb8d8bd775917a1bf12a7931b6dfa890753378538118181e0cb398" dependencies = [ "proc-macro2", "quote", @@ -319,18 +320,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" dependencies = [ "proc-macro2", "quote", @@ -345,15 +346,15 @@ checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "ucd-trie" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" [[package]] name = "unicode-ident" -version = "1.0.8" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "version_check" @@ -368,7 +369,6 @@ dependencies = [ "handlebars", "lazy_static", "polywrap-wasm-rs", - "polywrap_msgpack_serde", "serde", "serde_json", ] diff --git a/implementations/wrap-rust/Cargo.toml b/implementations/wrap-rust/Cargo.toml index 5df21fa3..b1de3e12 100644 --- a/implementations/wrap-rust/Cargo.toml +++ b/implementations/wrap-rust/Cargo.toml @@ -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" } diff --git a/implementations/wrap-rust/package.json b/implementations/wrap-rust/package.json index 9c9f40cd..8f1cbd28 100644 --- a/implementations/wrap-rust/package.json +++ b/implementations/wrap-rust/package.json @@ -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" } diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/_else/mod.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/_else/mod.rs index 1e13036d..a191960b 100644 --- a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/_else/mod.rs +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/_else/mod.rs @@ -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)] diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/another_type/mod.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/another_type/mod.rs index 171fa644..7a8fdbda 100644 --- a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/another_type/mod.rs +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/another_type/mod.rs @@ -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; diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/custom_map_value/mod.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/custom_map_value/mod.rs index 29689350..46f76167 100644 --- a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/custom_map_value/mod.rs +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/custom_map_value/mod.rs @@ -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)] diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/custom_type/mod.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/custom_type/mod.rs index 041745d4..a874b8fb 100644 --- a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/custom_type/mod.rs +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/custom_type/mod.rs @@ -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; @@ -37,11 +36,9 @@ pub struct CustomType { pub json: JSONString, #[serde(rename = "optJson")] pub opt_json: Option, - #[serde(with = "serde_bytes")] - pub bytes: Vec, - #[serde(with = "serde_bytes")] + pub bytes: ByteBuf, #[serde(rename = "optBytes")] - pub opt_bytes: Option>, + pub opt_bytes: Option, pub boolean: bool, #[serde(rename = "optBoolean")] pub opt_boolean: Option, diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/env/mod.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/env/mod.rs index cc57defa..393bd25c 100644 --- a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/env/mod.rs +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/env/mod.rs @@ -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)] diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_another_object/mod.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_another_object/mod.rs index d5b29d8a..b2037cae 100644 --- a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_another_object/mod.rs +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_another_object/mod.rs @@ -1,13 +1,15 @@ 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, + wrap_load_env, + to_vec, + from_slice, + JSONString, + BigIntWrapper, + ByteBuf }; #[derive(Clone, Debug, Deserialize, Serialize)] diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_env/mod.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_env/mod.rs index e4c9f5fd..0df6d350 100644 --- a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_env/mod.rs +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_env/mod.rs @@ -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::TestImportAnotherObject; use crate::TestImportEnum; diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_module/mod.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_module/mod.rs index 873e07c4..ae9bb2c2 100644 --- a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_module/mod.rs +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_module/mod.rs @@ -1,16 +1,15 @@ use serde::{Serialize, Deserialize}; -use polywrap_msgpack_serde::{ - from_slice, - to_vec, - wrappers::polywrap_json::JSONString, - wrappers::polywrap_bigint::BigIntWrapper -}; use polywrap_wasm_rs::{ BigInt, BigNumber, Map, JSON, - subinvoke + to_vec, + subinvoke, + from_slice, + JSONString, + BigIntWrapper, + ByteBuf }; use crate::TestImportObject; use crate::TestImportEnum; diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_object/mod.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_object/mod.rs index f0fbed2b..2b0b4d00 100644 --- a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_object/mod.rs +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/imported/test_import_object/mod.rs @@ -1,13 +1,15 @@ 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, + wrap_load_env, + to_vec, + from_slice, + JSONString, + BigIntWrapper, + ByteBuf }; use crate::TestImportAnotherObject; use crate::TestImportEnum; diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/module/module.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/module/module.rs index 5c4683e4..757142aa 100644 --- a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/module/module.rs +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/module/module.rs @@ -1,12 +1,10 @@ -use polywrap_msgpack_serde::{ - wrappers::polywrap_json::JSONString, - wrappers::polywrap_bigint::BigIntWrapper -}; use polywrap_wasm_rs::{ BigInt, BigNumber, Map, - JSON + JSON, + JSONString, + BigIntWrapper }; use crate::{ ArgsModuleMethod, diff --git a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/module/wrapped.rs b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/module/wrapped.rs index c9cba1ff..35d8608d 100644 --- a/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/module/wrapped.rs +++ b/implementations/wrap-rust/src/__tests__/cases/000-sanity/output/module/wrapped.rs @@ -1,16 +1,15 @@ use serde::{Deserialize, Serialize}; -use polywrap_msgpack_serde::{ - from_slice, - to_vec, - wrappers::polywrap_json::JSONString, - wrappers::polywrap_bigint::BigIntWrapper -}; use polywrap_wasm_rs::{ BigInt, BigNumber, Map, JSON, - wrap_load_env + wrap_load_env, + to_vec, + from_slice, + JSONString, + BigIntWrapper, + ByteBuf }; use crate::{ModuleTrait, Module}; use crate::CustomEnum; diff --git a/implementations/wrap-rust/src/__tests__/cases/001-module-functions/output/module/module.rs b/implementations/wrap-rust/src/__tests__/cases/001-module-functions/output/module/module.rs index 3f77b6e5..246924fd 100644 --- a/implementations/wrap-rust/src/__tests__/cases/001-module-functions/output/module/module.rs +++ b/implementations/wrap-rust/src/__tests__/cases/001-module-functions/output/module/module.rs @@ -1,12 +1,10 @@ -use polywrap_msgpack_serde::{ - wrappers::polywrap_json::JSONString, - wrappers::polywrap_bigint::BigIntWrapper -}; use polywrap_wasm_rs::{ BigInt, BigNumber, Map, - JSON + JSON, + JSONString, + BigIntWrapper }; use crate::{ ArgsFunction1, diff --git a/implementations/wrap-rust/src/__tests__/cases/001-module-functions/output/module/wrapped.rs b/implementations/wrap-rust/src/__tests__/cases/001-module-functions/output/module/wrapped.rs index f2c163d6..e17b326e 100644 --- a/implementations/wrap-rust/src/__tests__/cases/001-module-functions/output/module/wrapped.rs +++ b/implementations/wrap-rust/src/__tests__/cases/001-module-functions/output/module/wrapped.rs @@ -1,16 +1,15 @@ use serde::{Deserialize, Serialize}; -use polywrap_msgpack_serde::{ - from_slice, - to_vec, - wrappers::polywrap_json::JSONString, - wrappers::polywrap_bigint::BigIntWrapper -}; use polywrap_wasm_rs::{ BigInt, BigNumber, Map, JSON, - wrap_load_env + wrap_load_env, + to_vec, + from_slice, + JSONString, + BigIntWrapper, + ByteBuf }; use crate::{ModuleTrait, Module}; @@ -45,8 +44,7 @@ pub fn function1_wrapped(args: &[u8], env_size: u32) -> Vec { #[derive(Clone, Debug, Deserialize, Serialize)] pub struct ArgsFunction2 { pub arg1: Option, - #[serde(with = "serde_bytes")] - pub arg2: Option>, + pub arg2: Option, } pub fn function2_wrapped(args: &[u8], env_size: u32) -> Vec { diff --git a/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/_else/mod.rs b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/_else/mod.rs index 1e13036d..a191960b 100644 --- a/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/_else/mod.rs +++ b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/_else/mod.rs @@ -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)] diff --git a/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/another_type/mod.rs b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/another_type/mod.rs index 171fa644..7a8fdbda 100644 --- a/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/another_type/mod.rs +++ b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/another_type/mod.rs @@ -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; diff --git a/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/arg/mod.rs b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/arg/mod.rs index eb5eb30d..1b10c440 100644 --- a/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/arg/mod.rs +++ b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/arg/mod.rs @@ -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::Nested; diff --git a/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/custom_map_value/mod.rs b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/custom_map_value/mod.rs index 29689350..46f76167 100644 --- a/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/custom_map_value/mod.rs +++ b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/custom_map_value/mod.rs @@ -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)] diff --git a/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/custom_type/mod.rs b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/custom_type/mod.rs index c1308bdf..56a57cee 100644 --- a/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/custom_type/mod.rs +++ b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/custom_type/mod.rs @@ -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::CustomMapValue; @@ -36,11 +35,9 @@ pub struct CustomType { pub json: JSONString, #[serde(rename = "optJson")] pub opt_json: Option, - #[serde(with = "serde_bytes")] - pub bytes: Vec, - #[serde(with = "serde_bytes")] + pub bytes: ByteBuf, #[serde(rename = "optBytes")] - pub opt_bytes: Option>, + pub opt_bytes: Option, pub boolean: bool, #[serde(rename = "optBoolean")] pub opt_boolean: Option, diff --git a/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/module/module.rs b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/module/module.rs index 9a212678..afc3348a 100644 --- a/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/module/module.rs +++ b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/module/module.rs @@ -1,12 +1,10 @@ -use polywrap_msgpack_serde::{ - wrappers::polywrap_json::JSONString, - wrappers::polywrap_bigint::BigIntWrapper -}; use polywrap_wasm_rs::{ - BigInt, - BigNumber, - Map, - JSON + BigInt, + BigNumber, + Map, + JSON, + JSONString, + BigIntWrapper }; use crate::{ ArgsMethod, diff --git a/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/module/wrapped.rs b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/module/wrapped.rs index 0da90702..ab1ca05d 100644 --- a/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/module/wrapped.rs +++ b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/module/wrapped.rs @@ -1,16 +1,15 @@ use serde::{Deserialize, Serialize}; -use polywrap_msgpack_serde::{ - from_slice, - to_vec, - wrappers::polywrap_json::JSONString, - wrappers::polywrap_bigint::BigIntWrapper -}; use polywrap_wasm_rs::{ BigInt, BigNumber, Map, JSON, - wrap_load_env + wrap_load_env, + to_vec, + from_slice, + JSONString, + BigIntWrapper, + ByteBuf }; use crate::{ModuleTrait, Module}; use crate::Arg; diff --git a/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/nested/mod.rs b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/nested/mod.rs index b645bc6c..767cd842 100644 --- a/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/nested/mod.rs +++ b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/nested/mod.rs @@ -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)] diff --git a/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/output/mod.rs b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/output/mod.rs index 957bc049..924c6c49 100644 --- a/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/output/mod.rs +++ b/implementations/wrap-rust/src/__tests__/cases/002-object-types/output/output/mod.rs @@ -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::Nested; diff --git a/implementations/wrap-rust/src/__tests__/cases/003-env-types/output/env/mod.rs b/implementations/wrap-rust/src/__tests__/cases/003-env-types/output/env/mod.rs index aa696b68..b4dff5bf 100644 --- a/implementations/wrap-rust/src/__tests__/cases/003-env-types/output/env/mod.rs +++ b/implementations/wrap-rust/src/__tests__/cases/003-env-types/output/env/mod.rs @@ -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::EnvEnum; use crate::EnvObject; diff --git a/implementations/wrap-rust/src/__tests__/cases/003-env-types/output/env_object/mod.rs b/implementations/wrap-rust/src/__tests__/cases/003-env-types/output/env_object/mod.rs index 317f9e31..26ece9bd 100644 --- a/implementations/wrap-rust/src/__tests__/cases/003-env-types/output/env_object/mod.rs +++ b/implementations/wrap-rust/src/__tests__/cases/003-env-types/output/env_object/mod.rs @@ -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)] diff --git a/implementations/wrap-rust/src/__tests__/cases/003-env-types/output/module/module.rs b/implementations/wrap-rust/src/__tests__/cases/003-env-types/output/module/module.rs index 8ba7c074..ee4872dc 100644 --- a/implementations/wrap-rust/src/__tests__/cases/003-env-types/output/module/module.rs +++ b/implementations/wrap-rust/src/__tests__/cases/003-env-types/output/module/module.rs @@ -1,12 +1,10 @@ -use polywrap_msgpack_serde::{ - wrappers::polywrap_json::JSONString, - wrappers::polywrap_bigint::BigIntWrapper -}; use polywrap_wasm_rs::{ BigInt, BigNumber, Map, - JSON + JSON, + JSONString, + BigIntWrapper }; use crate::{ ArgsMethodNoEnv, diff --git a/implementations/wrap-rust/src/__tests__/cases/003-env-types/output/module/wrapped.rs b/implementations/wrap-rust/src/__tests__/cases/003-env-types/output/module/wrapped.rs index e533e013..6cd7578b 100644 --- a/implementations/wrap-rust/src/__tests__/cases/003-env-types/output/module/wrapped.rs +++ b/implementations/wrap-rust/src/__tests__/cases/003-env-types/output/module/wrapped.rs @@ -1,16 +1,15 @@ use serde::{Deserialize, Serialize}; -use polywrap_msgpack_serde::{ - from_slice, - to_vec, - wrappers::polywrap_json::JSONString, - wrappers::polywrap_bigint::BigIntWrapper -}; use polywrap_wasm_rs::{ BigInt, BigNumber, Map, JSON, - wrap_load_env + wrap_load_env, + to_vec, + from_slice, + JSONString, + BigIntWrapper, + ByteBuf }; use crate::{ModuleTrait, Module}; use crate::Env; diff --git a/implementations/wrap-rust/src/__tests__/polywrap.yaml b/implementations/wrap-rust/src/__tests__/polywrap.yaml index 655f8c41..01141817 100644 --- a/implementations/wrap-rust/src/__tests__/polywrap.yaml +++ b/implementations/wrap-rust/src/__tests__/polywrap.yaml @@ -1,4 +1,4 @@ -format: 0.3.0 +format: "0.4.0" project: name: test-types type: app/typescript diff --git a/implementations/wrap-rust/src/helpers/mod.rs b/implementations/wrap-rust/src/helpers/mod.rs index 20638183..6086f7e9 100644 --- a/implementations/wrap-rust/src/helpers/mod.rs +++ b/implementations/wrap-rust/src/helpers/mod.rs @@ -7,7 +7,6 @@ mod is_keyword; mod is_not_first; mod is_not_last; mod property_deps; -mod serde_annotate_if_bytes; mod serde_keyword; mod serde_rename_if_case_mismatch; mod to_graphql_type; @@ -48,10 +47,6 @@ pub fn register(handlebars: &mut Handlebars) -> () { "property_deps", Box::new(property_deps::property_deps) ); - handlebars.register_helper( - "serde_annotate_if_bytes", - Box::new(serde_annotate_if_bytes::serde_annotate_if_bytes) - ); handlebars.register_helper( "serde_keyword", Box::new(serde_keyword::serde_keyword) diff --git a/implementations/wrap-rust/src/helpers/serde_annotate_if_bytes.rs b/implementations/wrap-rust/src/helpers/serde_annotate_if_bytes.rs deleted file mode 100644 index 2305b54b..00000000 --- a/implementations/wrap-rust/src/helpers/serde_annotate_if_bytes.rs +++ /dev/null @@ -1,14 +0,0 @@ -use handlebars::handlebars_helper; -use serde_json::{Value}; - -handlebars_helper!(serde_annotate_if_bytes: |val: Value| { - let name = val.as_str().unwrap(); - _serde_annotate_if_bytes(name) -}); - -pub fn _serde_annotate_if_bytes(val: &str) -> String { - if val == "Bytes" { - return "#[serde(with = \"serde_bytes\")]\n ".to_string(); - } - "".to_string() -} diff --git a/implementations/wrap-rust/src/helpers/to_rust.rs b/implementations/wrap-rust/src/helpers/to_rust.rs index 359bd027..37f99adc 100644 --- a/implementations/wrap-rust/src/helpers/to_rust.rs +++ b/implementations/wrap-rust/src/helpers/to_rust.rs @@ -37,7 +37,7 @@ pub fn _to_rust(value: &str) -> String { "UInt64" => "u64".to_string(), "String" => "String".to_string(), "Boolean" => "bool".to_string(), - "Bytes" => "Vec".to_string(), + "Bytes" => "ByteBuf".to_string(), "BigInt" => "BigIntWrapper".to_string(), "BigNumber" => "BigNumber".to_string(), "JSON" => "JSONString".to_string(), diff --git a/implementations/wrap-rust/src/templates/env_type/mod_rs.rs b/implementations/wrap-rust/src/templates/env_type/mod_rs.rs index 34ff385e..b357f830 100644 --- a/implementations/wrap-rust/src/templates/env_type/mod_rs.rs +++ b/implementations/wrap-rust/src/templates/env_type/mod_rs.rs @@ -1,15 +1,14 @@ lazy_static! { static ref NAME: String = "env_type/mod.rs".to_string(); static ref SOURCE: String = r#"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 }; {{#each (property_deps this)}} use {{_crate}}::{{detect_keyword (to_upper _type)}}; @@ -18,7 +17,7 @@ use {{_crate}}::{{detect_keyword (to_upper _type)}}; #[derive(Clone, Debug, Deserialize, Serialize)] pub struct {{detect_keyword (to_upper type)}} { {{#each properties}} - {{#with scalar}}{{serde_annotate_if_bytes type}}{{/with}}{{serde_rename_if_case_mismatch name}}pub {{detect_keyword (to_lower name)}}: {{to_rust (to_graphql_type this)}}, + {{serde_rename_if_case_mismatch name}}pub {{detect_keyword (to_lower name)}}: {{to_rust (to_graphql_type this)}}, {{/each}} } diff --git a/implementations/wrap-rust/src/templates/imported/env_type/mod_rs.rs b/implementations/wrap-rust/src/templates/imported/env_type/mod_rs.rs index 4c8f4a39..761b89cd 100644 --- a/implementations/wrap-rust/src/templates/imported/env_type/mod_rs.rs +++ b/implementations/wrap-rust/src/templates/imported/env_type/mod_rs.rs @@ -1,15 +1,14 @@ lazy_static! { static ref NAME: String = "imported/env_type/mod.rs".to_string(); static ref SOURCE: String = r#"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 }; {{#each (property_deps this)}} use {{_crate}}::{{detect_keyword (to_upper _type)}}; diff --git a/implementations/wrap-rust/src/templates/imported/module_type/mod_rs.rs b/implementations/wrap-rust/src/templates/imported/module_type/mod_rs.rs index a031c85a..1ab8d6a3 100644 --- a/implementations/wrap-rust/src/templates/imported/module_type/mod_rs.rs +++ b/implementations/wrap-rust/src/templates/imported/module_type/mod_rs.rs @@ -1,18 +1,17 @@ lazy_static! { static ref NAME: String = "imported/module_type/mod.rs".to_string(); static ref SOURCE: String = r#"use serde::{Serialize, Deserialize}; -use polywrap_msgpack_serde::{ - from_slice, - to_vec, - wrappers::polywrap_json::JSONString, - wrappers::polywrap_bigint::BigIntWrapper -}; use polywrap_wasm_rs::{ BigInt, BigNumber, Map, JSON, - subinvoke + to_vec, + subinvoke, + from_slice, + JSONString, + BigIntWrapper, + ByteBuf }; {{#each (property_deps this)}} use {{_crate}}::{{detect_keyword (to_upper _type)}}; @@ -23,7 +22,7 @@ use {{_crate}}::{{detect_keyword (to_upper _type)}}; #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Args{{to_upper name}} { {{#each arguments}} - {{#with scalar}}{{serde_annotate_if_bytes type}}{{/with}}{{serde_rename_if_case_mismatch name}}pub {{detect_keyword (to_lower name)}}: {{to_rust (to_graphql_type this)}}, + {{serde_rename_if_case_mismatch name}}pub {{detect_keyword (to_lower name)}}: {{to_rust (to_graphql_type this)}}, {{/each}} } {{#if (is_not_last @index ../methods)}} diff --git a/implementations/wrap-rust/src/templates/imported/object_type/mod_rs.rs b/implementations/wrap-rust/src/templates/imported/object_type/mod_rs.rs index 0dd471f5..27247617 100644 --- a/implementations/wrap-rust/src/templates/imported/object_type/mod_rs.rs +++ b/implementations/wrap-rust/src/templates/imported/object_type/mod_rs.rs @@ -1,15 +1,17 @@ lazy_static! { static ref NAME: String = "imported/object_type/mod.rs".to_string(); static ref SOURCE: String = r#"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, + wrap_load_env, + to_vec, + from_slice, + JSONString, + BigIntWrapper, + ByteBuf }; {{#each (property_deps this)}} use {{_crate}}::{{detect_keyword (to_upper _type)}}; @@ -18,7 +20,7 @@ use {{_crate}}::{{detect_keyword (to_upper _type)}}; #[derive(Clone, Debug, Deserialize, Serialize)] pub struct {{detect_keyword (to_upper type)}} { {{#each properties}} - {{#with scalar}}{{serde_annotate_if_bytes type}}{{/with}}{{serde_rename_if_case_mismatch name}}pub {{detect_keyword (to_lower name)}}: {{to_rust (to_graphql_type this)}}, + {{serde_rename_if_case_mismatch name}}pub {{detect_keyword (to_lower name)}}: {{to_rust (to_graphql_type this)}}, {{/each}} } diff --git a/implementations/wrap-rust/src/templates/module_type/module_rs.rs b/implementations/wrap-rust/src/templates/module_type/module_rs.rs index 81be9d15..a9705d07 100644 --- a/implementations/wrap-rust/src/templates/module_type/module_rs.rs +++ b/implementations/wrap-rust/src/templates/module_type/module_rs.rs @@ -1,15 +1,13 @@ lazy_static! { static ref NAME: String = "module_type/module.rs".to_string(); static ref SOURCE: String = r#"{{#with moduleType}} -use polywrap_msgpack_serde::{ - wrappers::polywrap_json::JSONString, - wrappers::polywrap_bigint::BigIntWrapper -}; use polywrap_wasm_rs::{ BigInt, BigNumber, Map, - JSON + JSON, + JSONString, + BigIntWrapper }; use crate::{ {{#each methods}} diff --git a/implementations/wrap-rust/src/templates/module_type/wrapped_rs.rs b/implementations/wrap-rust/src/templates/module_type/wrapped_rs.rs index 8c9d0ce0..979f7f7c 100644 --- a/implementations/wrap-rust/src/templates/module_type/wrapped_rs.rs +++ b/implementations/wrap-rust/src/templates/module_type/wrapped_rs.rs @@ -3,18 +3,17 @@ lazy_static! { static ref SOURCE: String = r#"{{#with moduleType}} {{#if (array_has_length methods)}} use serde::{Deserialize, Serialize}; -use polywrap_msgpack_serde::{ - from_slice, - to_vec, - wrappers::polywrap_json::JSONString, - wrappers::polywrap_bigint::BigIntWrapper -}; use polywrap_wasm_rs::{ BigInt, BigNumber, Map, JSON, - wrap_load_env + wrap_load_env, + to_vec, + from_slice, + JSONString, + BigIntWrapper, + ByteBuf }; use crate::{ModuleTrait, Module}; {{#each (property_deps this)}} @@ -29,7 +28,7 @@ use crate::Env; #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Args{{to_upper name}} { {{#each arguments}} - {{#with scalar}}{{serde_annotate_if_bytes type}}{{/with}}{{serde_rename_if_case_mismatch name}}pub {{detect_keyword (to_lower name)}}: {{to_rust (to_graphql_type this)}}, + {{serde_rename_if_case_mismatch name}}pub {{detect_keyword (to_lower name)}}: {{to_rust (to_graphql_type this)}}, {{/each}} } diff --git a/implementations/wrap-rust/src/templates/object_type/mod_rs.rs b/implementations/wrap-rust/src/templates/object_type/mod_rs.rs index aa78c435..4e620dab 100644 --- a/implementations/wrap-rust/src/templates/object_type/mod_rs.rs +++ b/implementations/wrap-rust/src/templates/object_type/mod_rs.rs @@ -1,15 +1,14 @@ lazy_static! { static ref NAME: String = "object_type/mod.rs".to_string(); static ref SOURCE: String = r#"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 }; {{#each (property_deps this)}} use {{_crate}}::{{detect_keyword (to_upper _type)}}; @@ -18,7 +17,7 @@ use {{_crate}}::{{detect_keyword (to_upper _type)}}; #[derive(Clone, Debug, Deserialize, Serialize)] pub struct {{detect_keyword (to_upper type)}} { {{#each properties}} - {{#with scalar}}{{serde_annotate_if_bytes type}}{{/with}}{{serde_rename_if_case_mismatch name}}pub {{detect_keyword (to_lower name)}}: {{to_rust (to_graphql_type this)}}, + {{serde_rename_if_case_mismatch name}}pub {{detect_keyword (to_lower name)}}: {{to_rust (to_graphql_type this)}}, {{/each}} } diff --git a/implementations/wrap-rust/yarn.lock b/implementations/wrap-rust/yarn.lock index bc28934e..c647f00b 100644 --- a/implementations/wrap-rust/yarn.lock +++ b/implementations/wrap-rust/yarn.lock @@ -1231,10 +1231,10 @@ "@polywrap/core-js" "~0.12.0" "@polywrap/plugin-js" "~0.12.0" -"@polywrap/logging-js@0.11.2": - version "0.11.2" - resolved "https://registry.yarnpkg.com/@polywrap/logging-js/-/logging-js-0.11.2.tgz#b047ebba68b192c7ca7cd129c98a9af6501f91b1" - integrity sha512-+AFZfVHFRMtRTxZ7qO0gbqHffWE3/k8MlPNQPHY8ctfbaSvT6fuUaTQY4K26j8tttvnVf1OF/+7EHMwma0Qt0w== +"@polywrap/logging-js@0.11.3": + version "0.11.3" + resolved "https://registry.yarnpkg.com/@polywrap/logging-js/-/logging-js-0.11.3.tgz#83de43675277d99e1d70cf14caf4194b2e5af317" + integrity sha512-FvsYJW2+ObeYvw+zA6btBEVP37HCZMAmF8wCfgDcOGjDEPT/T1952WGle6t+VGgOrrRnmGoLsX3vF+0eVepVmg== "@polywrap/msgpack-js@0.12.2", "@polywrap/msgpack-js@~0.12.0": version "0.12.2" @@ -1243,10 +1243,10 @@ dependencies: "@msgpack/msgpack" "2.7.2" -"@polywrap/os-js@0.11.2": - version "0.11.2" - resolved "https://registry.yarnpkg.com/@polywrap/os-js/-/os-js-0.11.2.tgz#10b2aca36a9242e6acbeac3f652024905cb18eb4" - integrity sha512-D+LmabnRtK2LqIR7e7Gm0cpH1g38QSV/a+7iwsd0GKgzHpWKxc6u3Ms1YNe+4lNrCjnv6ghTyYyUaky7sBJZng== +"@polywrap/os-js@0.11.3": + version "0.11.3" + resolved "https://registry.yarnpkg.com/@polywrap/os-js/-/os-js-0.11.3.tgz#f874292870594e65af45c585da9d2be8732ef700" + integrity sha512-6YwW52H4OKnaPgbVQs5qcdt10WiNGaZOBQzc5+EvObIEguexxavVFxg2Di1bEflgceKPqbTz3vUo4PhgVw+h/w== "@polywrap/plugin-js@0.12.2", "@polywrap/plugin-js@~0.12.0", "@polywrap/plugin-js@~0.12.0-pre.0": version "0.12.2" @@ -1259,18 +1259,18 @@ "@polywrap/tracing-js" "0.12.2" "@polywrap/wrap-manifest-types-js" "0.12.2" -"@polywrap/polywrap-manifest-schemas@0.11.2": - version "0.11.2" - resolved "https://registry.yarnpkg.com/@polywrap/polywrap-manifest-schemas/-/polywrap-manifest-schemas-0.11.2.tgz#0d9891cb42fe519c4387055c4947150cfe6f0385" - integrity sha512-u7jj9VFjbcVaKFGKi7u7YWL63RL0t4hhWDgZYZI+/RyipAIdEc4nJ9G7WGomm/nOm8mM/TYgR3B9+XX26QmqJQ== +"@polywrap/polywrap-manifest-schemas@0.11.3": + version "0.11.3" + resolved "https://registry.yarnpkg.com/@polywrap/polywrap-manifest-schemas/-/polywrap-manifest-schemas-0.11.3.tgz#b2c04241b86b914eef3357ddcf394ff2e940076e" + integrity sha512-WpBCqacDr2ywKlj7Zkglaxv5J+1Ki/M4m9RKLCrKki27Dck3gWEdeXbR/S9Li0Ko1ax5Hwtz/THSXOEmuAvYLQ== -"@polywrap/polywrap-manifest-types-js@0.11.2": - version "0.11.2" - resolved "https://registry.yarnpkg.com/@polywrap/polywrap-manifest-types-js/-/polywrap-manifest-types-js-0.11.2.tgz#364abaf04e4b5765702729d289549b6cee63a4fe" - integrity sha512-HRvIgGP6lyJ9qC14TjF7SLLZzuZbzRUTqZIdzrmxxW420SnBtn+e0RKMdpjQDFknbZJCf4X6MUfUZagzYYy58g== +"@polywrap/polywrap-manifest-types-js@0.11.3": + version "0.11.3" + resolved "https://registry.yarnpkg.com/@polywrap/polywrap-manifest-types-js/-/polywrap-manifest-types-js-0.11.3.tgz#03dc7a65edefd93257f668d1d2d1843678c628ac" + integrity sha512-pWpV4BLX1RvypNqOLjdgcABgeB2eyc6EoXYvEH7ekbm8jxhxNPqMum6lCg1Yfz+XnfzVteuhpj4NQH9SASgPTg== dependencies: - "@polywrap/logging-js" "0.11.2" - "@polywrap/polywrap-manifest-schemas" "0.11.2" + "@polywrap/logging-js" "0.11.3" + "@polywrap/polywrap-manifest-schemas" "0.11.3" jsonschema "1.4.0" semver "7.5.3" yaml "2.2.2" @@ -1280,31 +1280,31 @@ resolved "https://registry.yarnpkg.com/@polywrap/result/-/result-0.12.2.tgz#99ad60da087db4dd2ad760ba1bd27a752d4af45f" integrity sha512-gcRUsWz3Qyd7CxWqrTTj1NCl2h74yI2lgqMlUfCn4TVdBmRqbyTe5iP+g+R/qs0qO0Ud8Sx0GAfbSuZfzClJ2g== -"@polywrap/schema-bind@0.11.2": - version "0.11.2" - resolved "https://registry.yarnpkg.com/@polywrap/schema-bind/-/schema-bind-0.11.2.tgz#ebd9458abe0751ccd8dbef1ee76ce24be7a4d4b5" - integrity sha512-YWIOmKGHG7DKqKWfWU8SiTIsmB64xfuiHVcyP58IQ1FSUJXXTFAPGpMv3rtJimejTR4Chfye2prMJFgnJHDTnw== +"@polywrap/schema-bind@0.11.3": + version "0.11.3" + resolved "https://registry.yarnpkg.com/@polywrap/schema-bind/-/schema-bind-0.11.3.tgz#c74eaec0600269d6f767e8018d8d0280b7eb22a0" + integrity sha512-8dNMHDH1BKr1uJxU2jSdaXJakUFwn3sLFYA13fmrUdFveh6bfnLnD62pQ4oVZWc2+fUlLyb72v/pHDgqrjaXkg== dependencies: "@polywrap/client-js" "~0.12.0" - "@polywrap/os-js" "0.11.2" - "@polywrap/schema-parse" "0.11.2" + "@polywrap/os-js" "0.11.3" + "@polywrap/schema-parse" "0.11.3" "@polywrap/wrap-manifest-types-js" "~0.12.0" mustache "4.0.1" -"@polywrap/schema-compose@0.11.2": - version "0.11.2" - resolved "https://registry.yarnpkg.com/@polywrap/schema-compose/-/schema-compose-0.11.2.tgz#20c6138d9994d0d32d00d76b0f807ea97a2724e8" - integrity sha512-OcOF/a0Im8vmF3hbALxVnoh3ixsRdpwMxkH/wWFGsALkz1rZKFaJeGj+ALdklBOReVdcCjaSwl667NTiQT/QSA== +"@polywrap/schema-compose@0.11.3": + version "0.11.3" + resolved "https://registry.yarnpkg.com/@polywrap/schema-compose/-/schema-compose-0.11.3.tgz#debd1394e79dc6b042af91131e6aabee41b9a513" + integrity sha512-fuTp1r+4Yy1BEE7GqRW9Egtxze0Ojr8m4GuOe8rVl6CvhiUsoedadSRjnnKB8Hv4JjFxfc4I9qF7ahCAaDwGlw== dependencies: - "@polywrap/schema-parse" "0.11.2" + "@polywrap/schema-parse" "0.11.3" "@polywrap/wrap-manifest-types-js" "~0.12.0" graphql "15.5.0" mustache "4.0.1" -"@polywrap/schema-parse@0.11.2", "@polywrap/schema-parse@~0.11.2": - version "0.11.2" - resolved "https://registry.yarnpkg.com/@polywrap/schema-parse/-/schema-parse-0.11.2.tgz#73ed0898c4d2400a8faed7ae65f537a0b07018f7" - integrity sha512-UX4XMGS6RmwnMuDu6SQpfe5mUlk8TxlcMVNSPOKUb9b/+lKS7THNzTvgTMiO7yK3wwlhtPmB2BvWsFLnbE9BAg== +"@polywrap/schema-parse@0.11.3": + version "0.11.3" + resolved "https://registry.yarnpkg.com/@polywrap/schema-parse/-/schema-parse-0.11.3.tgz#8f7a1e57941f8fd5a6145586f7aacdec439709fe" + integrity sha512-oGg/ooW0HiUGqHeSVjPZGZxLF+L9lonAnqBEC9BLN7/1q6oh1yI9foC/ki6XtlUJrRCLecf+PSfwugZr/mZEkw== dependencies: "@dorgjelli/graphql-schema-cycles" "1.1.4" "@polywrap/wrap-manifest-types-js" "~0.12.0" @@ -4133,10 +4133,10 @@ pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" -polywrap@~0.11.2: - version "0.11.2" - resolved "https://registry.yarnpkg.com/polywrap/-/polywrap-0.11.2.tgz#ada70dbafb26696744ca38b3fe52adee77833dca" - integrity sha512-43rGZNf3AiJr2UKL5gaRitNQNrN6hVOdRVx/Jxsl5NlgFWRJsVpb+A7ADwfXRVlAObJSavlYgs1B+Bgdu67A+A== +polywrap@0.11.3: + version "0.11.3" + resolved "https://registry.yarnpkg.com/polywrap/-/polywrap-0.11.3.tgz#f1d5a5e77fa644f4610415094488f8c69702ca10" + integrity sha512-dRTPPRtVbeZ6WFux+8tA7x5IZnxWklrz7DgIPd8vWeVwAVsaZrUW31LHG0gf7rWzekTM3YeRs20WTtlUDcznrQ== dependencies: "@apidevtools/json-schema-ref-parser" "9.0.9" "@ethersproject/providers" "5.6.8" @@ -4147,13 +4147,13 @@ polywrap@~0.11.2: "@polywrap/client-js" "~0.12.0" "@polywrap/core-js" "~0.12.0" "@polywrap/ethereum-wallet-js" "~0.1.0" - "@polywrap/logging-js" "0.11.2" - "@polywrap/os-js" "0.11.2" - "@polywrap/polywrap-manifest-types-js" "0.11.2" + "@polywrap/logging-js" "0.11.3" + "@polywrap/os-js" "0.11.3" + "@polywrap/polywrap-manifest-types-js" "0.11.3" "@polywrap/result" "~0.12.0" - "@polywrap/schema-bind" "0.11.2" - "@polywrap/schema-compose" "0.11.2" - "@polywrap/schema-parse" "0.11.2" + "@polywrap/schema-bind" "0.11.3" + "@polywrap/schema-compose" "0.11.3" + "@polywrap/schema-parse" "0.11.3" "@polywrap/sys-config-bundle-js" "~0.12.0" "@polywrap/uri-resolver-extensions-js" "~0.12.0" "@polywrap/uri-resolvers-js" "~0.12.0"