From 7e6828fd1546ca3deef34836b4a624c5d7497fa5 Mon Sep 17 00:00:00 2001 From: Niraj Kamdar Date: Fri, 18 Aug 2023 03:55:36 +0530 Subject: [PATCH 01/11] wip: rust template --- .../cli/src/__tests__/e2e/p1/create.spec.ts | 2 +- packages/cli/src/commands/create.ts | 2 +- .../lib/project/manifests/app/languages.ts | 3 ++ packages/schema/bind/src/bindings/index.ts | 4 +++ packages/schema/bind/src/types.ts | 1 + packages/templates/app/rust/.gitignore | 23 ++++++++++++++ packages/templates/app/rust/.nvmrc | 1 + packages/templates/app/rust/Cargo.toml | 22 ++++++++++++++ packages/templates/app/rust/package.json | 19 ++++++++++++ packages/templates/app/rust/polywrap.graphql | 2 ++ packages/templates/app/rust/polywrap.yaml | 6 ++++ packages/templates/app/rust/src/lib.rs | 0 packages/templates/app/rust/tsconfig.json | 30 +++++++++++++++++++ 13 files changed, 113 insertions(+), 2 deletions(-) create mode 100644 packages/templates/app/rust/.gitignore create mode 100644 packages/templates/app/rust/.nvmrc create mode 100644 packages/templates/app/rust/Cargo.toml create mode 100644 packages/templates/app/rust/package.json create mode 100644 packages/templates/app/rust/polywrap.graphql create mode 100644 packages/templates/app/rust/polywrap.yaml create mode 100644 packages/templates/app/rust/src/lib.rs create mode 100644 packages/templates/app/rust/tsconfig.json diff --git a/packages/cli/src/__tests__/e2e/p1/create.spec.ts b/packages/cli/src/__tests__/e2e/p1/create.spec.ts index 574b6c0d26..1ee741bf24 100644 --- a/packages/cli/src/__tests__/e2e/p1/create.spec.ts +++ b/packages/cli/src/__tests__/e2e/p1/create.spec.ts @@ -17,7 +17,7 @@ Commands: wasm [options] Create a Polywrap wasm wrapper. langs: assemblyscript, rust, golang, interface app [options] Create a Polywrap application. langs: - typescript + typescript, rust plugin [options] Create a Polywrap plugin. langs: typescript, rust, python template [options] Download template from a URL. formats: diff --git a/packages/cli/src/commands/create.ts b/packages/cli/src/commands/create.ts index f840396b4e..a5479f7604 100644 --- a/packages/cli/src/commands/create.ts +++ b/packages/cli/src/commands/create.ts @@ -28,7 +28,7 @@ const urlStr = intlMsg.commands_create_options_t_url(); export const supportedLangs = { wasm: ["assemblyscript", "rust", "golang", "interface"] as const, - app: ["typescript"] as const, + app: ["typescript", "rust"] as const, plugin: ["typescript", "rust", "python"] as const, }; diff --git a/packages/cli/src/lib/project/manifests/app/languages.ts b/packages/cli/src/lib/project/manifests/app/languages.ts index ccea1d3b7f..2769340c18 100644 --- a/packages/cli/src/lib/project/manifests/app/languages.ts +++ b/packages/cli/src/lib/project/manifests/app/languages.ts @@ -4,6 +4,7 @@ import { BindLanguage } from "@polywrap/schema-bind"; export const appManifestLanguages = { "app/typescript": "app/typescript", + "app/rust": "app/rust", }; export type AppManifestLanguages = typeof appManifestLanguages; @@ -22,6 +23,8 @@ export function appManifestLanguageToBindLanguage( switch (manifestLanguage) { case "app/typescript": return "app-ts"; + case "app/rust": + return "app-rs"; default: throw Error( intlMsg.lib_language_unsupportedManifestLanguage({ diff --git a/packages/schema/bind/src/bindings/index.ts b/packages/schema/bind/src/bindings/index.ts index 4bf8889c88..817813e980 100644 --- a/packages/schema/bind/src/bindings/index.ts +++ b/packages/schema/bind/src/bindings/index.ts @@ -45,6 +45,10 @@ export function getGenerateBindingFn( return WrapBindgen.getGenerateBindingFn( "https://github.com/polywrap/wrap-abi-bindgen/tree/nk/ts-app-codegen/implementations/app-typescript" ); + case "app-rs": + return WrapBindgen.getGenerateBindingFn( + "https://github.com/polywrap/wrap-abi-bindgen/tree/nk/rs-app-codegen/implementations/app-rust" + ); default: throw Error(`Error: Language binding unsupported - ${bindLanguage}`); } diff --git a/packages/schema/bind/src/types.ts b/packages/schema/bind/src/types.ts index c7d043e9f6..0d24c8520a 100644 --- a/packages/schema/bind/src/types.ts +++ b/packages/schema/bind/src/types.ts @@ -11,6 +11,7 @@ export const bindLanguage = { "plugin-kt": "plugin-kt", "plugin-swift": "plugin-swift", "app-ts": "app-ts", + "app-rs": "app-rs", }; export type BindLanguages = typeof bindLanguage; diff --git a/packages/templates/app/rust/.gitignore b/packages/templates/app/rust/.gitignore new file mode 100644 index 0000000000..4d29575de8 --- /dev/null +++ b/packages/templates/app/rust/.gitignore @@ -0,0 +1,23 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# production +/build + +# misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/packages/templates/app/rust/.nvmrc b/packages/templates/app/rust/.nvmrc new file mode 100644 index 0000000000..501570628a --- /dev/null +++ b/packages/templates/app/rust/.nvmrc @@ -0,0 +1 @@ +v17.9.1 \ No newline at end of file diff --git a/packages/templates/app/rust/Cargo.toml b/packages/templates/app/rust/Cargo.toml new file mode 100644 index 0000000000..79b0b23af8 --- /dev/null +++ b/packages/templates/app/rust/Cargo.toml @@ -0,0 +1,22 @@ +[package] +name = "template_plugin_rs" +version = "0.1.0" +license = "MIT" +description = "Polywrap Rust Plugin Template" +edition = "2021" + +include = [ + "src/wrap/*", + "src/lib.rs" +] + +[dependencies] +polywrap_core = { version = "~0.1.6-beta.1" } +polywrap_plugin = { version = "~0.1.6-beta.1" } +polywrap_msgpack = { version = "~0.1.6-beta.1" } +polywrap_msgpack_serde = { version = "~0.0.2-beta.5" } +wrap_manifest_schemas = { version = "~0.1.6-beta.1" } +serde = {version = "1.0.145", features = ["derive"]} + +[dev-dependencies] +polywrap_client = { version = "~0.1.6-beta.1" } diff --git a/packages/templates/app/rust/package.json b/packages/templates/app/rust/package.json new file mode 100644 index 0000000000..d5882b1e9f --- /dev/null +++ b/packages/templates/app/rust/package.json @@ -0,0 +1,19 @@ +{ + "name": "templates-app-rust", + "description": "Polywrap App Rust Template", + "private": true, + "version": "0.11.1", + "scripts": { + "build": "npx polywrap codegen", + "test": "ts-node ./src/index.ts" + }, + "dependencies": { + "@polywrap/client-js": "~0.12.0" + }, + "devDependencies": { + "@types/node": "18.15.0", + "polywrap": "0.11.1", + "ts-node": "10.9.1", + "typescript": "4.9.5" + } +} diff --git a/packages/templates/app/rust/polywrap.graphql b/packages/templates/app/rust/polywrap.graphql new file mode 100644 index 0000000000..2b89a5497f --- /dev/null +++ b/packages/templates/app/rust/polywrap.graphql @@ -0,0 +1,2 @@ +#import * into Logging from "ens/wraps.eth:logging@1.0.0" +#import * into Ethereum from "ens/wraps.eth:ethereum@1.0.0" diff --git a/packages/templates/app/rust/polywrap.yaml b/packages/templates/app/rust/polywrap.yaml new file mode 100644 index 0000000000..506dd2f9f2 --- /dev/null +++ b/packages/templates/app/rust/polywrap.yaml @@ -0,0 +1,6 @@ +format: 0.3.0 +project: + name: Sample + type: app/rust +source: + schema: ./polywrap.graphql diff --git a/packages/templates/app/rust/src/lib.rs b/packages/templates/app/rust/src/lib.rs new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/templates/app/rust/tsconfig.json b/packages/templates/app/rust/tsconfig.json new file mode 100644 index 0000000000..2e01ca5c22 --- /dev/null +++ b/packages/templates/app/rust/tsconfig.json @@ -0,0 +1,30 @@ +{ + "compilerOptions": { + "esModuleInterop": true, + "lib": [ + "es2015", + "es5", + "dom" + ], + "downlevelIteration": true, + "experimentalDecorators": true, + "moduleResolution": "node", + "declaration": true, + "preserveSymlinks": true, + "preserveWatchOutput": true, + "pretty": false, + "forceConsistentCasingInFileNames": true, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noUnusedLocals": true, + "module": "commonjs", + "sourceMap": true, + "target": "es5", + "resolveJsonModule": true, + "strictNullChecks": true + }, + "include": [ + "./src/**/*" + ], +} From 0156c2e9a2cdcddce6437463f57bf28008673d96 Mon Sep 17 00:00:00 2001 From: Niraj Kamdar Date: Sun, 20 Aug 2023 14:31:06 +0530 Subject: [PATCH 02/11] wip --- packages/templates/app/rust/Cargo.toml | 7 +------ packages/templates/app/rust/polywrap.graphql | 1 - packages/templates/app/rust/src/lib.rs | 2 ++ 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/templates/app/rust/Cargo.toml b/packages/templates/app/rust/Cargo.toml index 79b0b23af8..8dc1457ae2 100644 --- a/packages/templates/app/rust/Cargo.toml +++ b/packages/templates/app/rust/Cargo.toml @@ -11,12 +11,7 @@ include = [ ] [dependencies] -polywrap_core = { version = "~0.1.6-beta.1" } -polywrap_plugin = { version = "~0.1.6-beta.1" } -polywrap_msgpack = { version = "~0.1.6-beta.1" } -polywrap_msgpack_serde = { version = "~0.0.2-beta.5" } -wrap_manifest_schemas = { version = "~0.1.6-beta.1" } +polywrap = { version = "~0.1.8-beta.2" } serde = {version = "1.0.145", features = ["derive"]} [dev-dependencies] -polywrap_client = { version = "~0.1.6-beta.1" } diff --git a/packages/templates/app/rust/polywrap.graphql b/packages/templates/app/rust/polywrap.graphql index 2b89a5497f..fef936b659 100644 --- a/packages/templates/app/rust/polywrap.graphql +++ b/packages/templates/app/rust/polywrap.graphql @@ -1,2 +1 @@ #import * into Logging from "ens/wraps.eth:logging@1.0.0" -#import * into Ethereum from "ens/wraps.eth:ethereum@1.0.0" diff --git a/packages/templates/app/rust/src/lib.rs b/packages/templates/app/rust/src/lib.rs index e69de29bb2..0ba9095d80 100644 --- a/packages/templates/app/rust/src/lib.rs +++ b/packages/templates/app/rust/src/lib.rs @@ -0,0 +1,2 @@ +mod wrap; + From 7feacfa35f9fbfb7c3fd1050f3af29943ad02f61 Mon Sep 17 00:00:00 2001 From: Niraj Kamdar Date: Tue, 22 Aug 2023 23:40:07 +0530 Subject: [PATCH 03/11] working ipfs demo --- packages/templates/app/rust/Cargo.toml | 1 + packages/templates/app/rust/package.json | 4 ++- packages/templates/app/rust/polywrap.graphql | 1 + packages/templates/app/rust/src/lib.rs | 37 ++++++++++++++++++++ 4 files changed, 42 insertions(+), 1 deletion(-) diff --git a/packages/templates/app/rust/Cargo.toml b/packages/templates/app/rust/Cargo.toml index 8dc1457ae2..479808533f 100644 --- a/packages/templates/app/rust/Cargo.toml +++ b/packages/templates/app/rust/Cargo.toml @@ -12,6 +12,7 @@ include = [ [dependencies] polywrap = { version = "~0.1.8-beta.2" } +polywrap_logger_plugin = { version = "~0.1.8-beta.2" } serde = {version = "1.0.145", features = ["derive"]} [dev-dependencies] diff --git a/packages/templates/app/rust/package.json b/packages/templates/app/rust/package.json index d5882b1e9f..2617cd459a 100644 --- a/packages/templates/app/rust/package.json +++ b/packages/templates/app/rust/package.json @@ -5,7 +5,9 @@ "version": "0.11.1", "scripts": { "build": "npx polywrap codegen", - "test": "ts-node ./src/index.ts" + "test": "ts-node ./src/index.ts", + "ipfs:up": "npx polywrap infra up --modules=eth-ens-ipfs", + "ipfs:down": "npx polywrap infra down --modules=eth-ens-ipfs" }, "dependencies": { "@polywrap/client-js": "~0.12.0" diff --git a/packages/templates/app/rust/polywrap.graphql b/packages/templates/app/rust/polywrap.graphql index fef936b659..8b060a01bf 100644 --- a/packages/templates/app/rust/polywrap.graphql +++ b/packages/templates/app/rust/polywrap.graphql @@ -1 +1,2 @@ #import * into Logging from "ens/wraps.eth:logging@1.0.0" +#import * into Ipfs from "wrapscan.io/polywrap/ipfs-http-client@1.0" diff --git a/packages/templates/app/rust/src/lib.rs b/packages/templates/app/rust/src/lib.rs index 0ba9095d80..c7b00c5b86 100644 --- a/packages/templates/app/rust/src/lib.rs +++ b/packages/templates/app/rust/src/lib.rs @@ -1,2 +1,39 @@ mod wrap; +use polywrap::ByteBuf; +use wrap::types::*; + +pub fn main() { + let ipfs_provider = "http://localhost:5001"; + let data = "hello world"; + let ipfs = IpfsModule::new(None, None, None); + let ipfs_add_result = ipfs.add_file(&IpfsModuleArgsAddFile{ + data: IpfsFileEntry { + name: "hello.txt".to_string(), + data: ByteBuf::from(data.as_bytes().to_vec()), + }, + ipfs_provider: ipfs_provider.to_string(), + timeout: None, + add_options: None + }, None, None, None).unwrap(); + + let cid = ipfs_add_result.hash; + + let data = ipfs.cat(&IpfsModuleArgsCat{ + cid: cid.clone(), + ipfs_provider: ipfs_provider.to_string(), + timeout: None, + cat_options: None + }, None, None, None).unwrap(); + + assert_eq!(data, ByteBuf::from("hello world".as_bytes().to_vec())); +} + +#[cfg(test)] +mod client_tests { + + #[test] + fn test_client() { + super::main(); + } +} From e8a49155ee3ec9bf06559d73fbd3a17c855a60c2 Mon Sep 17 00:00:00 2001 From: Niraj Kamdar Date: Mon, 28 Aug 2023 17:40:13 +0530 Subject: [PATCH 04/11] chore: use ipfs.io in template --- packages/templates/app/rust/src/lib.rs | 31 +++++++++----------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/packages/templates/app/rust/src/lib.rs b/packages/templates/app/rust/src/lib.rs index c7b00c5b86..c744392ca0 100644 --- a/packages/templates/app/rust/src/lib.rs +++ b/packages/templates/app/rust/src/lib.rs @@ -4,29 +4,18 @@ use polywrap::ByteBuf; use wrap::types::*; pub fn main() { - let ipfs_provider = "http://localhost:5001"; - let data = "hello world"; - let ipfs = IpfsModule::new(None, None, None); - let ipfs_add_result = ipfs.add_file(&IpfsModuleArgsAddFile{ - data: IpfsFileEntry { - name: "hello.txt".to_string(), - data: ByteBuf::from(data.as_bytes().to_vec()), - }, - ipfs_provider: ipfs_provider.to_string(), - timeout: None, - add_options: None - }, None, None, None).unwrap(); + let ipfs_provider = "https://ipfs.io"; + let cid = "Qmc5gCcjYypU7y28oCALwfSvxCBskLuPKWpK4qpterKC7z"; + let ipfs = IpfsModule::new(None, None, None); - let cid = ipfs_add_result.hash; + let data = ipfs.cat(&IpfsModuleArgsCat{ + cid: cid.to_string(), + ipfs_provider: ipfs_provider.to_string(), + timeout: None, + cat_options: None + }, None, None, None).unwrap(); - let data = ipfs.cat(&IpfsModuleArgsCat{ - cid: cid.clone(), - ipfs_provider: ipfs_provider.to_string(), - timeout: None, - cat_options: None - }, None, None, None).unwrap(); - - assert_eq!(data, ByteBuf::from("hello world".as_bytes().to_vec())); + assert_eq!(data, ByteBuf::from("Hello World!\r\n".as_bytes().to_vec())); } #[cfg(test)] From 40d51826b664b6285c3125c7ae31804d0988d2f9 Mon Sep 17 00:00:00 2001 From: Niraj Kamdar Date: Mon, 28 Aug 2023 18:12:22 +0530 Subject: [PATCH 05/11] fix: issues --- yarn.lock | 54 ++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 38 insertions(+), 16 deletions(-) diff --git a/yarn.lock b/yarn.lock index f0519c5aab..208b661737 100644 --- a/yarn.lock +++ b/yarn.lock @@ -137,7 +137,7 @@ convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" - json5 "^2.2.2" + json5 "^2.2.3" semver "^6.3.1" "@babel/generator@^7.22.10": @@ -2350,6 +2350,15 @@ ajv "8.12.0" semver "~7.5.4" +"@polywrap/wrap-manifest-types-js@0.12.2": + version "0.12.2" + resolved "https://registry.yarnpkg.com/@polywrap/wrap-manifest-types-js/-/wrap-manifest-types-js-0.12.2.tgz#c27f5f320b53de6744cfc2344bb90a1e6ff9e8d6" + integrity sha512-YlOCK1V0fFitunWvsRrQFiQMPETARLMd/d/iCeubkUzIh4TUr2gEtHbc8n2C9FYUFa4zLcY84mKfdDSyTf49jw== + dependencies: + "@polywrap/msgpack-js" "0.12.2" + ajv "8.12.0" + semver "~7.5.4" + "@sinclair/typebox@^0.24.1": version "0.24.51" resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.24.51.tgz#645f33fe4e02defe26f2f5c0410e1c094eac7f5f" @@ -4338,7 +4347,7 @@ error-ex@^1.2.0, error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.19.0, es-abstract@^1.20.4, es-abstract@^1.21.2: +es-abstract@^1.19.0, es-abstract@^1.20.4, es-abstract@^1.21.2, es-abstract@^1.22.1: version "1.22.1" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.22.1.tgz#8b4e5fc5cefd7f1660f0f8e1a52900dfbc9d9ccc" integrity sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw== @@ -4961,14 +4970,15 @@ find-up@^4.0.0, find-up@^4.1.0: path-exists "^4.0.0" flat-cache@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" - integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== + version "3.1.0" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.1.0.tgz#0e54ab4a1a60fe87e2946b6b00657f1c99e1af3f" + integrity sha512-OHx4Qwrrt0E4jEIcI5/Xb+f+QmJYNj2rrK8wiIdQOIrB9WrrJL8cjZvXdXuBTkkEwEqLycb5BeZDV1o2i9bTew== dependencies: - flatted "^3.1.0" + flatted "^3.2.7" + keyv "^4.5.3" rimraf "^3.0.2" -flatted@^3.1.0: +flatted@^3.2.7: version "3.2.7" resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== @@ -5069,9 +5079,9 @@ fs.realpath@^1.0.0: integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== fsevents@^2.1.2, fsevents@~2.3.1: - version "2.3.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== function-bind@^1.1.1: version "1.1.1" @@ -6584,6 +6594,11 @@ jsesc@^2.5.1: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== +json-buffer@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== + json-parse-better-errors@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" @@ -6639,7 +6654,7 @@ json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== -json5@2.x, json5@^2.2.2: +json5@2.x, json5@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== @@ -6685,6 +6700,13 @@ jsprim@^1.2.2: json-schema "0.4.0" verror "1.10.0" +keyv@^4.5.3: + version "4.5.3" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.3.tgz#00873d2b046df737963157bd04f294ca818c9c25" + integrity sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug== + dependencies: + json-buffer "3.0.1" + kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" @@ -7716,13 +7738,13 @@ object.pick@^1.3.0: isobject "^3.0.1" object.values@^1.1.1: - version "1.1.6" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.6.tgz#4abbaa71eba47d63589d402856f908243eea9b1d" - integrity sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw== + version "1.1.7" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.7.tgz#617ed13272e7e1071b43973aa1655d9291b8442a" + integrity sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng== dependencies: call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" + define-properties "^1.2.0" + es-abstract "^1.22.1" once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" From 14d4ce21a689cb006cc4a47231c87b9a42072281 Mon Sep 17 00:00:00 2001 From: Niraj Kamdar Date: Tue, 29 Aug 2023 20:12:55 +0530 Subject: [PATCH 06/11] fix: rust app template --- packages/templates/app/rust/Cargo.toml | 3 +- packages/templates/app/rust/package.json | 4 +- yarn.lock | 113 +++++++++++------------ 3 files changed, 55 insertions(+), 65 deletions(-) diff --git a/packages/templates/app/rust/Cargo.toml b/packages/templates/app/rust/Cargo.toml index 479808533f..affcfbd4c3 100644 --- a/packages/templates/app/rust/Cargo.toml +++ b/packages/templates/app/rust/Cargo.toml @@ -11,8 +11,7 @@ include = [ ] [dependencies] -polywrap = { version = "~0.1.8-beta.2" } -polywrap_logger_plugin = { version = "~0.1.8-beta.2" } +polywrap = { version = "~0.1.8" } serde = {version = "1.0.145", features = ["derive"]} [dev-dependencies] diff --git a/packages/templates/app/rust/package.json b/packages/templates/app/rust/package.json index 2617cd459a..8165e171cf 100644 --- a/packages/templates/app/rust/package.json +++ b/packages/templates/app/rust/package.json @@ -2,7 +2,7 @@ "name": "templates-app-rust", "description": "Polywrap App Rust Template", "private": true, - "version": "0.11.1", + "version": "0.11.2", "scripts": { "build": "npx polywrap codegen", "test": "ts-node ./src/index.ts", @@ -14,7 +14,7 @@ }, "devDependencies": { "@types/node": "18.15.0", - "polywrap": "0.11.1", + "polywrap": "0.11.2", "ts-node": "10.9.1", "typescript": "4.9.5" } diff --git a/yarn.lock b/yarn.lock index 208b661737..3ec9e5db11 100644 --- a/yarn.lock +++ b/yarn.lock @@ -107,11 +107,11 @@ nearley "^2.20.1" "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.22.10", "@babel/code-frame@^7.22.5": - version "7.22.10" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.10.tgz#1c20e612b768fefa75f6e90d6ecb86329247f0a3" - integrity sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA== + version "7.22.13" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.13.tgz#e3c1c099402598483b7a8c46a721d1038803755e" + integrity sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w== dependencies: - "@babel/highlight" "^7.22.10" + "@babel/highlight" "^7.22.13" chalk "^2.4.2" "@babel/compat-data@^7.22.9": @@ -120,20 +120,20 @@ integrity sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ== "@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.7.5": - version "7.22.10" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.22.10.tgz#aad442c7bcd1582252cb4576747ace35bc122f35" - integrity sha512-fTmqbbUBAwCcre6zPzNngvsI0aNrPZe77AeqvDxWM9Nm+04RrJ3CAmGHA9f7lJQY6ZMhRztNemy4uslDxTX4Qw== + version "7.22.11" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.22.11.tgz#8033acaa2aa24c3f814edaaa057f3ce0ba559c24" + integrity sha512-lh7RJrtPdhibbxndr6/xx0w8+CVlY5FJZiaSz908Fpy+G0xkBFTvwLcKJFF4PJxVfGhVWNebikpWGnOoC71juQ== dependencies: "@ampproject/remapping" "^2.2.0" "@babel/code-frame" "^7.22.10" "@babel/generator" "^7.22.10" "@babel/helper-compilation-targets" "^7.22.10" "@babel/helper-module-transforms" "^7.22.9" - "@babel/helpers" "^7.22.10" - "@babel/parser" "^7.22.10" + "@babel/helpers" "^7.22.11" + "@babel/parser" "^7.22.11" "@babel/template" "^7.22.5" - "@babel/traverse" "^7.22.10" - "@babel/types" "^7.22.10" + "@babel/traverse" "^7.22.11" + "@babel/types" "^7.22.11" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" @@ -233,28 +233,28 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz#de52000a15a177413c8234fa3a8af4ee8102d0ac" integrity sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw== -"@babel/helpers@^7.22.10": - version "7.22.10" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.22.10.tgz#ae6005c539dfbcb5cd71fb51bfc8a52ba63bc37a" - integrity sha512-a41J4NW8HyZa1I1vAndrraTlPZ/eZoga2ZgS7fEr0tZJGVU4xqdE80CEm0CcNjha5EZ8fTBYLKHF0kqDUuAwQw== +"@babel/helpers@^7.22.11": + version "7.22.11" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.22.11.tgz#b02f5d5f2d7abc21ab59eeed80de410ba70b056a" + integrity sha512-vyOXC8PBWaGc5h7GMsNx68OH33cypkEDJCHvYVVgVbbxJDROYVtexSk0gK5iCF1xNjRIN2s8ai7hwkWDq5szWg== dependencies: "@babel/template" "^7.22.5" - "@babel/traverse" "^7.22.10" - "@babel/types" "^7.22.10" + "@babel/traverse" "^7.22.11" + "@babel/types" "^7.22.11" -"@babel/highlight@^7.22.10": - version "7.22.10" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.10.tgz#02a3f6d8c1cb4521b2fd0ab0da8f4739936137d7" - integrity sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ== +"@babel/highlight@^7.22.13": + version "7.22.13" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.13.tgz#9cda839e5d3be9ca9e8c26b6dd69e7548f0cbf16" + integrity sha512-C/BaXcnnvBCmHTpz/VGZ8jgtE2aYlW4hxDhseJAWZb7gqGM/qtCK6iZUb0TyKFf7BOUsBH7Q7fkRsDRhg1XklQ== dependencies: "@babel/helper-validator-identifier" "^7.22.5" chalk "^2.4.2" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.22.10", "@babel/parser@^7.22.5": - version "7.22.10" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.10.tgz#e37634f9a12a1716136c44624ef54283cabd3f55" - integrity sha512-lNbdGsQb9ekfsnjFGhEiF4hfFqGgfOP3H3d27re3n+CGhNuTSUEQdfWk556sTLNTloczcdM5TYF2LhzmDQKyvQ== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.22.11", "@babel/parser@^7.22.5": + version "7.22.13" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.13.tgz#23fb17892b2be7afef94f573031c2f4b42839a2b" + integrity sha512-3l6+4YOvc9wx7VlCSw4yQfcBo01ECA8TicQfbnCPuCEpRQrf+gTUyGdxNw+pyTUyywp6JRD1w0YQs9TpBXYlkw== "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -349,10 +349,10 @@ "@babel/parser" "^7.22.5" "@babel/types" "^7.22.5" -"@babel/traverse@^7.1.0", "@babel/traverse@^7.22.10": - version "7.22.10" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.22.10.tgz#20252acb240e746d27c2e82b4484f199cf8141aa" - integrity sha512-Q/urqV4pRByiNNpb/f5OSv28ZlGJiFiiTh+GAHktbIrkPhPbl90+uW6SmpoLyZqutrg9AEaEf3Q/ZBRHBXgxig== +"@babel/traverse@^7.1.0", "@babel/traverse@^7.22.11": + version "7.22.11" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.22.11.tgz#71ebb3af7a05ff97280b83f05f8865ac94b2027c" + integrity sha512-mzAenteTfomcB7mfPtyi+4oe5BZ6MXxWcn4CX+h4IRJ+OOGXBrWU6jDQavkQI9Vuc5P+donFabBfFCcmWka9lQ== dependencies: "@babel/code-frame" "^7.22.10" "@babel/generator" "^7.22.10" @@ -360,15 +360,15 @@ "@babel/helper-function-name" "^7.22.5" "@babel/helper-hoist-variables" "^7.22.5" "@babel/helper-split-export-declaration" "^7.22.6" - "@babel/parser" "^7.22.10" - "@babel/types" "^7.22.10" + "@babel/parser" "^7.22.11" + "@babel/types" "^7.22.11" debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.10", "@babel/types@^7.22.5", "@babel/types@^7.3.3": - version "7.22.10" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.10.tgz#4a9e76446048f2c66982d1a989dd12b8a2d2dc03" - integrity sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg== +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.10", "@babel/types@^7.22.11", "@babel/types@^7.22.5", "@babel/types@^7.3.3": + version "7.22.11" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.11.tgz#0e65a6a1d4d9cbaa892b2213f6159485fe632ea2" + integrity sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg== dependencies: "@babel/helper-string-parser" "^7.22.5" "@babel/helper-validator-identifier" "^7.22.5" @@ -2350,15 +2350,6 @@ ajv "8.12.0" semver "~7.5.4" -"@polywrap/wrap-manifest-types-js@0.12.2": - version "0.12.2" - resolved "https://registry.yarnpkg.com/@polywrap/wrap-manifest-types-js/-/wrap-manifest-types-js-0.12.2.tgz#c27f5f320b53de6744cfc2344bb90a1e6ff9e8d6" - integrity sha512-YlOCK1V0fFitunWvsRrQFiQMPETARLMd/d/iCeubkUzIh4TUr2gEtHbc8n2C9FYUFa4zLcY84mKfdDSyTf49jw== - dependencies: - "@polywrap/msgpack-js" "0.12.2" - ajv "8.12.0" - semver "~7.5.4" - "@sinclair/typebox@^0.24.1": version "0.24.51" resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.24.51.tgz#645f33fe4e02defe26f2f5c0410e1c094eac7f5f" @@ -3499,9 +3490,9 @@ camelcase@^6.0.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001517: - version "1.0.30001522" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001522.tgz#44b87a406c901269adcdb834713e23582dd71856" - integrity sha512-TKiyTVZxJGhsTszLuzb+6vUZSjVOAhClszBr2Ta2k9IwtNBT/4dzmL6aywt0HCgEZlmwJzXJd8yNiob6HgwTRg== + version "1.0.30001524" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001524.tgz#1e14bce4f43c41a7deaeb5ebfe86664fe8dadb80" + integrity sha512-Jj917pJtYg9HSJBF95HVX3Cdr89JUyLT4IZ8SvM5aDRni95swKgYi3TgYLH5hnGfPE/U1dg6IfZ50UsIlLkwSA== capture-exit@^2.0.0: version "2.0.0" @@ -4271,9 +4262,9 @@ ecc-jsbn@~0.1.1: safer-buffer "^2.1.0" electron-to-chromium@^1.4.477: - version "1.4.496" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.496.tgz#a57534b70d2bdee7e1ad7dbd4c91e560cbd08db1" - integrity sha512-qeXC3Zbykq44RCrBa4kr8v/dWzYJA8rAwpyh9Qd+NKWoJfjG5vvJqy9XOJ9H4P/lqulZBCgUWAYi+FeK5AuJ8g== + version "1.4.504" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.504.tgz#975522945676cf2d55910988a169f07b83081488" + integrity sha512-cSMwIAd8yUh54VwitVRVvHK66QqHWE39C3DRj8SWiXitEpVSY3wNPD9y1pxQtLIi4w3UdzF9klLsmuPshz09DQ== elliptic@6.5.4: version "6.5.4" @@ -4347,7 +4338,7 @@ error-ex@^1.2.0, error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.19.0, es-abstract@^1.20.4, es-abstract@^1.21.2, es-abstract@^1.22.1: +es-abstract@^1.20.4, es-abstract@^1.21.2, es-abstract@^1.22.1: version "1.22.1" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.22.1.tgz#8b4e5fc5cefd7f1660f0f8e1a52900dfbc9d9ccc" integrity sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw== @@ -5089,21 +5080,21 @@ function-bind@^1.1.1: integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== function.prototype.name@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" - integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== + version "1.1.6" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.6.tgz#cdf315b7d90ee77a4c6ee216c3c3362da07533fd" + integrity sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg== dependencies: call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.0" - functions-have-names "^1.2.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + functions-have-names "^1.2.3" functional-red-black-tree@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== -functions-have-names@^1.2.2, functions-have-names@^1.2.3: +functions-have-names@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== @@ -7430,9 +7421,9 @@ nice-try@^1.0.4: integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== node-fetch@^2.6.1, node-fetch@^2.6.7: - version "2.6.13" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.13.tgz#a20acbbec73c2e09f9007de5cda17104122e0010" - integrity sha512-StxNAxh15zr77QvvkmveSQ8uCQ4+v5FkvNTj0OESmiHu+VRi/gXArXtkWMElOsOUNLtUEvI4yS+rdtOHZTwlQA== + version "2.7.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" + integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== dependencies: whatwg-url "^5.0.0" From f7deeb09bd6f1e118d2ae4120c14380e4ea57759 Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Thu, 31 Aug 2023 02:00:23 +0200 Subject: [PATCH 07/11] chore: remove wraps.eth dep --- packages/templates/app/rust/polywrap.graphql | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/templates/app/rust/polywrap.graphql b/packages/templates/app/rust/polywrap.graphql index 8b060a01bf..99f9e5a24d 100644 --- a/packages/templates/app/rust/polywrap.graphql +++ b/packages/templates/app/rust/polywrap.graphql @@ -1,2 +1 @@ -#import * into Logging from "ens/wraps.eth:logging@1.0.0" #import * into Ipfs from "wrapscan.io/polywrap/ipfs-http-client@1.0" From a269b7aba46ce36df1adc03deb9d66ab0e8b5962 Mon Sep 17 00:00:00 2001 From: Niraj Kamdar Date: Thu, 31 Aug 2023 17:01:13 +0530 Subject: [PATCH 08/11] feat: add rust app template tests --- packages/templates/tests.spec.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/templates/tests.spec.ts b/packages/templates/tests.spec.ts index 9693ee913d..d16ec6820e 100644 --- a/packages/templates/tests.spec.ts +++ b/packages/templates/tests.spec.ts @@ -39,6 +39,11 @@ describe("Templates", () => { build: "cargo build", test: "cargo test", }, + "app/rust": { + codegen: "npx polywrap codegen", + build: "cargo build", + test: "cargo test", + }, interface: { build: "npx polywrap build" }, }; From 949f1f1617f571b9a4d0777c12b33836400eba5e Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Fri, 1 Sep 2023 15:39:44 +0200 Subject: [PATCH 09/11] chore: minor fixes --- packages/templates/app/rust/.nvmrc | 2 +- packages/templates/app/rust/Cargo.toml | 4 +-- packages/templates/app/rust/package.json | 16 ++---------- packages/templates/app/rust/tsconfig.json | 30 ----------------------- 4 files changed, 5 insertions(+), 47 deletions(-) delete mode 100644 packages/templates/app/rust/tsconfig.json diff --git a/packages/templates/app/rust/.nvmrc b/packages/templates/app/rust/.nvmrc index 501570628a..2f3b977c5b 100644 --- a/packages/templates/app/rust/.nvmrc +++ b/packages/templates/app/rust/.nvmrc @@ -1 +1 @@ -v17.9.1 \ No newline at end of file +v18.15.0 \ No newline at end of file diff --git a/packages/templates/app/rust/Cargo.toml b/packages/templates/app/rust/Cargo.toml index affcfbd4c3..565176c7ff 100644 --- a/packages/templates/app/rust/Cargo.toml +++ b/packages/templates/app/rust/Cargo.toml @@ -1,8 +1,8 @@ [package] -name = "template_plugin_rs" +name = "template_app_rs" version = "0.1.0" license = "MIT" -description = "Polywrap Rust Plugin Template" +description = "Polywrap Rust App Template" edition = "2021" include = [ diff --git a/packages/templates/app/rust/package.json b/packages/templates/app/rust/package.json index 8165e171cf..eb4da2de18 100644 --- a/packages/templates/app/rust/package.json +++ b/packages/templates/app/rust/package.json @@ -1,21 +1,9 @@ { - "name": "templates-app-rust", - "description": "Polywrap App Rust Template", "private": true, - "version": "0.11.2", "scripts": { - "build": "npx polywrap codegen", - "test": "ts-node ./src/index.ts", - "ipfs:up": "npx polywrap infra up --modules=eth-ens-ipfs", - "ipfs:down": "npx polywrap infra down --modules=eth-ens-ipfs" + "build": "npx polywrap codegen" }, "dependencies": { - "@polywrap/client-js": "~0.12.0" - }, - "devDependencies": { - "@types/node": "18.15.0", - "polywrap": "0.11.2", - "ts-node": "10.9.1", - "typescript": "4.9.5" + "polywrap": "0.11.2" } } diff --git a/packages/templates/app/rust/tsconfig.json b/packages/templates/app/rust/tsconfig.json deleted file mode 100644 index 2e01ca5c22..0000000000 --- a/packages/templates/app/rust/tsconfig.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "compilerOptions": { - "esModuleInterop": true, - "lib": [ - "es2015", - "es5", - "dom" - ], - "downlevelIteration": true, - "experimentalDecorators": true, - "moduleResolution": "node", - "declaration": true, - "preserveSymlinks": true, - "preserveWatchOutput": true, - "pretty": false, - "forceConsistentCasingInFileNames": true, - "noFallthroughCasesInSwitch": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "noUnusedLocals": true, - "module": "commonjs", - "sourceMap": true, - "target": "es5", - "resolveJsonModule": true, - "strictNullChecks": true - }, - "include": [ - "./src/**/*" - ], -} From e02408543bd82989acfe5a873d18e02d364e1dc0 Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Fri, 1 Sep 2023 15:43:29 +0200 Subject: [PATCH 10/11] chore: move to dev deps --- packages/templates/app/rust/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/templates/app/rust/package.json b/packages/templates/app/rust/package.json index eb4da2de18..f546364315 100644 --- a/packages/templates/app/rust/package.json +++ b/packages/templates/app/rust/package.json @@ -3,7 +3,7 @@ "scripts": { "build": "npx polywrap codegen" }, - "dependencies": { + "devDependencies": { "polywrap": "0.11.2" } } From d541e62679ceb70bfbdd3787e876e1ef96e338bf Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Fri, 1 Sep 2023 15:49:20 +0200 Subject: [PATCH 11/11] chore: fix CI --- packages/templates/app/rust/package.json | 1 + yarn.lock | 26 ++++++++++++------------ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/packages/templates/app/rust/package.json b/packages/templates/app/rust/package.json index f546364315..e7abd5db4e 100644 --- a/packages/templates/app/rust/package.json +++ b/packages/templates/app/rust/package.json @@ -1,4 +1,5 @@ { + "name": "template-app-rust", "private": true, "scripts": { "build": "npx polywrap codegen" diff --git a/yarn.lock b/yarn.lock index 50e5baed1e..54f41f39d0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3038,7 +3038,7 @@ array.prototype.flat@^1.2.3: es-abstract "^1.20.4" es-shim-unscopables "^1.0.0" -array.prototype.reduce@^1.0.5: +array.prototype.reduce@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/array.prototype.reduce/-/array.prototype.reduce-1.0.6.tgz#63149931808c5fc1e1354814923d92d45f7d96d5" integrity sha512-UW+Mz8LG/sPSU8jRDCjVr6J/ZKAGpHfwrZ6kWTG5qCxIEiXdVshqGnu5vEZA8S1y6X4aCSbQZ0/EEsfvEvBiSg== @@ -3490,9 +3490,9 @@ camelcase@^6.0.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001517: - version "1.0.30001524" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001524.tgz#1e14bce4f43c41a7deaeb5ebfe86664fe8dadb80" - integrity sha512-Jj917pJtYg9HSJBF95HVX3Cdr89JUyLT4IZ8SvM5aDRni95swKgYi3TgYLH5hnGfPE/U1dg6IfZ50UsIlLkwSA== + version "1.0.30001525" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001525.tgz#d2e8fdec6116ffa36284ca2c33ef6d53612fe1c8" + integrity sha512-/3z+wB4icFt3r0USMwxujAqRvaD/B7rvGTsKhbhSQErVrJvkZCLhgNLJxU8MevahQVH6hCU9FsHdNUFbiwmE7Q== capture-exit@^2.0.0: version "2.0.0" @@ -4262,9 +4262,9 @@ ecc-jsbn@~0.1.1: safer-buffer "^2.1.0" electron-to-chromium@^1.4.477: - version "1.4.506" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.506.tgz#59f64a211102db4c3ebae2f39cc0e8e1b12b3a07" - integrity sha512-xxGct4GPAKSRlrLBtJxJFYy74W11zX6PO9GyHgl/U+2s3Dp0ZEwAklDfNHXOWcvH7zWMpsmgbR0ggEuaYAVvHA== + version "1.4.508" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.508.tgz#5641ff2f5ba11df4bd960fe6a2f9f70aa8b9af96" + integrity sha512-FFa8QKjQK/A5QuFr2167myhMesGrhlOBD+3cYNxO9/S4XzHEXesyTD/1/xF644gC8buFPz3ca6G1LOQD0tZrrg== elliptic@6.5.4: version "6.5.4" @@ -4338,7 +4338,7 @@ error-ex@^1.2.0, error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.20.4, es-abstract@^1.21.2, es-abstract@^1.22.1: +es-abstract@^1.20.4, es-abstract@^1.22.1: version "1.22.1" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.22.1.tgz#8b4e5fc5cefd7f1660f0f8e1a52900dfbc9d9ccc" integrity sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw== @@ -7711,14 +7711,14 @@ object.assign@^4.1.4: object-keys "^1.1.1" object.getownpropertydescriptors@^2.0.3: - version "2.1.6" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.6.tgz#5e5c384dd209fa4efffead39e3a0512770ccc312" - integrity sha512-lq+61g26E/BgHv0ZTFgRvi7NMEPuAxLkFU7rukXjc/AlwH4Am5xXVnIXy3un1bg/JPbXHrixRkK1itUzzPiIjQ== + version "2.1.7" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.7.tgz#7a466a356cd7da4ba8b9e94ff6d35c3eeab5d56a" + integrity sha512-PrJz0C2xJ58FNn11XV2lr4Jt5Gzl94qpy9Lu0JlfEj14z88sqbSBJCBEzdlNUCzY2gburhbrwOZ5BHCmuNUy0g== dependencies: - array.prototype.reduce "^1.0.5" + array.prototype.reduce "^1.0.6" call-bind "^1.0.2" define-properties "^1.2.0" - es-abstract "^1.21.2" + es-abstract "^1.22.1" safe-array-concat "^1.0.0" object.pick@^1.3.0: