From 7b3a8847f8969d22ffe866c3d004da1acd0a71aa Mon Sep 17 00:00:00 2001 From: krisbitney Date: Wed, 6 Sep 2023 16:50:38 +0300 Subject: [PATCH 01/10] updated wrap-rs bindgen uri --- packages/schema/bind/src/bindings/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schema/bind/src/bindings/index.ts b/packages/schema/bind/src/bindings/index.ts index a330b9aa2..38ee16a10 100644 --- a/packages/schema/bind/src/bindings/index.ts +++ b/packages/schema/bind/src/bindings/index.ts @@ -17,7 +17,7 @@ export function getGenerateBindingFn( ); case "wrap-rs": return WrapBindgen.getGenerateBindingFn( - "wrapscan.io/polywrap/wrap-rust-abi-bindgen@1" + "wrapscan.io/polywrap/wrap-rust-abi-bindgen@2" ); case "wrap-go": return Golang.Wasm.generateBinding; From 92cfdd95b07da7838494e0b2372eb3ea3c8e791d Mon Sep 17 00:00:00 2001 From: krisbitney Date: Mon, 11 Sep 2023 12:22:23 +0300 Subject: [PATCH 02/10] fix for polywrap binary artifact upload in CD --- .github/workflows/cd-source.yaml | 38 ++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/.github/workflows/cd-source.yaml b/.github/workflows/cd-source.yaml index 5a60e9110..b0a8e37bc 100644 --- a/.github/workflows/cd-source.yaml +++ b/.github/workflows/cd-source.yaml @@ -83,17 +83,17 @@ jobs: if: env.TAG_EXISTS == 'false' working-directory: ./packages/cli run: | - npx pkg --config ./package.json --target=${{ matrix.node-version }}-${{ matrix.os }}-${{ matrix.arch }} --output ./standalone-binaries/${{ matrix.os }}-${{ matrix.arch }}/polywrap --compress Brotli ./bin/polywrap + npx pkg . --target=${{ matrix.node-version }}-${{ matrix.os }}-${{ matrix.arch }} --output ./standalone-binaries/polywrap-${{ matrix.os }}-${{ matrix.arch }} --compress Brotli - name: Extract binary path if: env.TAG_EXISTS == 'false' - run: echo STANDALONE_BINARY_PATH=$(stat ./packages/cli/standalone-binaries/${{ matrix.os }}-${{ matrix.arch }}/polywrap* | awk '/File:/ {print $2}') >> $GITHUB_ENV + run: echo STANDALONE_BINARY_PATH=$(stat ./packages/cli/standalone-binaries/polywrap-${{ matrix.os }}-${{ matrix.arch }} | awk '/File:/ {print $2}') >> $GITHUB_ENV - name: Upload Artifacts if: env.TAG_EXISTS == 'false' uses: actions/upload-artifact@v3 with: - name: cli-binary-${{ matrix.os }}-${{ matrix.arch }} + name: polywrap-${{ matrix.os }}-${{ matrix.arch }} path: ${{ env.STANDALONE_BINARY_PATH }} Publish-GitHub: @@ -157,38 +157,38 @@ jobs: - name: Download Artifacts linux-x64 uses: actions/download-artifact@v3 with: - name: cli-binary-linux-x64 - path: ./bin/linux-x64/ + name: polywrap-linux-x64 + path: ./bin/polywrap-linux-x64 - name: Download Artifacts linux-arm64 uses: actions/download-artifact@v3 with: - name: cli-binary-linux-arm64 - path: ./bin/linux-arm64/ + name: polywrap-linux-arm64 + path: ./bin/polywrap-linux-arm64 - name: Download Artifacts macos-x64 uses: actions/download-artifact@v3 with: - name: cli-binary-macos-x64 - path: ./bin/macos-x64/ + name: polywrap-macos-x64 + path: ./bin/polywrap-macos-x64 - name: Download Artifacts macos-arm64 uses: actions/download-artifact@v3 with: - name: cli-binary-macos-arm64 - path: ./bin/macos-arm64/ + name: polywrap-macos-arm64 + path: ./bin/polywrap-macos-arm64 - name: Download Artifacts win-x64 uses: actions/download-artifact@v3 with: - name: cli-binary-win-x64 - path: ./bin/win-x64/ + name: polywrap-win-x64 + path: ./bin/polywrap-win-x64 - name: Download Artifacts win-arm64 uses: actions/download-artifact@v3 with: - name: cli-binary-win-arm64 - path: ./bin/win-arm64/ + name: polywrap-win-arm64 + path: ./bin/polywrap-win-arm64 - name: Create Release id: create_release @@ -204,7 +204,13 @@ jobs: ${{ github.event.pull_request.body }} draft: false prerelease: false - files: ./bin + files: | + ./bin/polywrap-linux-x64 + ./bin/polywrap-linux-arm64 + ./bin/polywrap-macos-x64 + ./bin/polywrap-macos-arm64 + ./bin/polywrap-win-x64 + ./bin/polywrap-win-arm64 - uses: actions/github-script@0.8.0 if: env.TAG_EXISTS == 'false' From 27459c70124809f2955d5b89f8e021826a81da44 Mon Sep 17 00:00:00 2001 From: Cesar Date: Tue, 12 Sep 2023 21:46:51 +0200 Subject: [PATCH 03/10] update WRAP_TEST_HARNESS --- WRAP_TEST_HARNESS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WRAP_TEST_HARNESS b/WRAP_TEST_HARNESS index 1f7391f92..6c883bfda 100644 --- a/WRAP_TEST_HARNESS +++ b/WRAP_TEST_HARNESS @@ -1 +1 @@ -master +kris/test-wrap-rust-2 From 678791521f827017f0415616909091c3d8ddfc7b Mon Sep 17 00:00:00 2001 From: Cesar Date: Tue, 12 Sep 2023 22:01:41 +0200 Subject: [PATCH 04/10] chore(ci): fix CLI path in wrap test harness build --- .github/workflows/ci-wrap-test-harness.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-wrap-test-harness.yaml b/.github/workflows/ci-wrap-test-harness.yaml index 5819a9024..ef7770e4e 100644 --- a/.github/workflows/ci-wrap-test-harness.yaml +++ b/.github/workflows/ci-wrap-test-harness.yaml @@ -103,10 +103,10 @@ jobs: cargo-${{ runner.os }}-${{ github.job }} - name: Set environment variable - run: echo POLYWRAP_CLI_PATH=$(pwd)/toolchain/packages/cli >> $GITHUB_ENV + run: echo POLYWRAP_CLI_PATH=$(pwd)/../toolchain/packages/cli >> $GITHUB_ENV - name: Set environment variable - run: echo POLYWRAP_WASM_PATH=$(pwd)/toolchain/packages/wasm >> $GITHUB_ENV + run: echo POLYWRAP_WASM_PATH=$(pwd)/../toolchain/packages/wasm >> $GITHUB_ENV - name: Modify permissions of cargo registry run: sudo chown -R runner:runner ${HOME}/.cargo/registry From 6d979a2ba23158be18a361959664120bff26aad0 Mon Sep 17 00:00:00 2001 From: Cesar Date: Tue, 12 Sep 2023 22:33:20 +0200 Subject: [PATCH 05/10] chore: add debug logs --- .github/workflows/ci-wrap-test-harness.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-wrap-test-harness.yaml b/.github/workflows/ci-wrap-test-harness.yaml index ef7770e4e..b05f96b2b 100644 --- a/.github/workflows/ci-wrap-test-harness.yaml +++ b/.github/workflows/ci-wrap-test-harness.yaml @@ -102,11 +102,17 @@ jobs: restore-keys: | cargo-${{ runner.os }}-${{ github.job }} + - name: Log toolchain folders + run: ls toolchain + + - name: Log toolchain packages + run: ls toolchain/packages + - name: Set environment variable - run: echo POLYWRAP_CLI_PATH=$(pwd)/../toolchain/packages/cli >> $GITHUB_ENV + run: echo POLYWRAP_CLI_PATH=$(pwd)/toolchain/packages/cli >> $GITHUB_ENV - name: Set environment variable - run: echo POLYWRAP_WASM_PATH=$(pwd)/../toolchain/packages/wasm >> $GITHUB_ENV + run: echo POLYWRAP_WASM_PATH=$(pwd)/toolchain/packages/wasm >> $GITHUB_ENV - name: Modify permissions of cargo registry run: sudo chown -R runner:runner ${HOME}/.cargo/registry From e1f6746dd5b6b053eb6ff5cf1cf858ad1b95ecc5 Mon Sep 17 00:00:00 2001 From: Cesar Date: Wed, 13 Sep 2023 15:51:57 +0200 Subject: [PATCH 06/10] chore: update rust template with prelude import --- packages/templates/wasm/rust/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/templates/wasm/rust/src/lib.rs b/packages/templates/wasm/rust/src/lib.rs index 5141adeb9..83c0727d0 100644 --- a/packages/templates/wasm/rust/src/lib.rs +++ b/packages/templates/wasm/rust/src/lib.rs @@ -1,5 +1,5 @@ pub mod wrap; -pub use wrap::*; +pub use wrap::prelude::*; impl ModuleTrait for Module { fn sample_method(args: ArgsSampleMethod) -> Result { From 3d09f79b03dd627f6b56ea0cc784c241f86c2553 Mon Sep 17 00:00:00 2001 From: Cesar Date: Wed, 13 Sep 2023 17:20:48 +0200 Subject: [PATCH 07/10] chore: rust cli fix --- .../cases/cli/build-cmd/wasm/rust/001-sanity/Cargo.toml | 1 - .../cases/cli/build-cmd/wasm/rust/001-sanity/src/lib.rs | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/test-cases/cases/cli/build-cmd/wasm/rust/001-sanity/Cargo.toml b/packages/test-cases/cases/cli/build-cmd/wasm/rust/001-sanity/Cargo.toml index 0f0fc6300..0604b9b1a 100644 --- a/packages/test-cases/cases/cli/build-cmd/wasm/rust/001-sanity/Cargo.toml +++ b/packages/test-cases/cases/cli/build-cmd/wasm/rust/001-sanity/Cargo.toml @@ -12,7 +12,6 @@ edition = "2021" [dependencies] polywrap-wasm-rs = { path = "../../../../../../../wasm/rs" } -polywrap_msgpack_serde = "~0.0.2-beta.5" serde = { version = "1.0", features = ["derive"] } [lib] diff --git a/packages/test-cases/cases/cli/build-cmd/wasm/rust/001-sanity/src/lib.rs b/packages/test-cases/cases/cli/build-cmd/wasm/rust/001-sanity/src/lib.rs index bab1bccc2..415c579ca 100644 --- a/packages/test-cases/cases/cli/build-cmd/wasm/rust/001-sanity/src/lib.rs +++ b/packages/test-cases/cases/cli/build-cmd/wasm/rust/001-sanity/src/lib.rs @@ -1,8 +1,8 @@ pub mod wrap; -pub use wrap::*; +pub use wrap::prelude::*; impl ModuleTrait for Module { - fn method(args: wrap::module::ArgsMethod) -> Result { + fn method(args: ArgsMethod) -> Result { Ok(args.arg) } } From 5a968affa48ab64f19df6cbfc8c0da44b831fb61 Mon Sep 17 00:00:00 2001 From: krisbitney Date: Wed, 13 Sep 2023 20:01:06 +0300 Subject: [PATCH 08/10] fixes for cli release cd --- .github/workflows/cd-source.yaml | 67 +++++++++++++++++++++++++------- 1 file changed, 52 insertions(+), 15 deletions(-) diff --git a/.github/workflows/cd-source.yaml b/.github/workflows/cd-source.yaml index b0a8e37bc..20d2fb38b 100644 --- a/.github/workflows/cd-source.yaml +++ b/.github/workflows/cd-source.yaml @@ -80,20 +80,57 @@ jobs: yarn build - name: Package into standalone binary - if: env.TAG_EXISTS == 'false' + if: env.TAG_EXISTS == 'false' && startsWith(matrix.arch, 'arm64') + uses: uraimo/run-on-arch-action@v2 + with: + arch: aarch64 + distro: ubuntu18.04 + githubToken: ${{ secrets.GITHUB_TOKEN }} + install: | + apt update && apt -y install curl + curl -fsSL https://deb.nodesource.com/setup_14.x | bash - + apt-get install -y nodejs + curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - + echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list + apt update && apt -y install yarn + yarn global add pkg@5.8.1 --prefix /usr/local + pkg --version + run: | + pkg \ + --config ./packages/cli/package.json \ + --target=${{ matrix.node-version }}-${{ matrix.os }}-${{ matrix.arch }} \ + --output ./packages/cli/standalone-binaries/polywrap-${{ matrix.os }}-${{ matrix.arch }} \ + --debug \ + --compress Brotli \ + ./packages/cli/bin/polywrap + + - name: Package into standalone binary + if: env.TAG_EXISTS == 'false' && startsWith(matrix.arch, 'x64') working-directory: ./packages/cli run: | - npx pkg . --target=${{ matrix.node-version }}-${{ matrix.os }}-${{ matrix.arch }} --output ./standalone-binaries/polywrap-${{ matrix.os }}-${{ matrix.arch }} --compress Brotli + npx pkg \ + --config ./package.json \ + --target=${{ matrix.node-version }}-${{ matrix.os }}-${{ matrix.arch }} \ + --output ./standalone-binaries/polywrap-${{ matrix.os }}-${{ matrix.arch }} \ + --compress Brotli \ + ./bin/polywrap - name: Extract binary path if: env.TAG_EXISTS == 'false' - run: echo STANDALONE_BINARY_PATH=$(stat ./packages/cli/standalone-binaries/polywrap-${{ matrix.os }}-${{ matrix.arch }} | awk '/File:/ {print $2}') >> $GITHUB_ENV + run: | + if [[ "${{ matrix.os }}" == "win" ]]; then + FILE_NAME="polywrap-${{ matrix.os }}-${{ matrix.arch }}.exe" + else + FILE_NAME="polywrap-${{ matrix.os }}-${{ matrix.arch }}" + fi + echo STANDALONE_BINARY_PATH=$(stat ./packages/cli/standalone-binaries/$FILE_NAME | awk '/File:/ {print $2}') >> $GITHUB_ENV + echo FILE_NAME=$FILE_NAME >> $GITHUB_ENV - name: Upload Artifacts if: env.TAG_EXISTS == 'false' uses: actions/upload-artifact@v3 with: - name: polywrap-${{ matrix.os }}-${{ matrix.arch }} + name: ${{ env.FILE_NAME }} path: ${{ env.STANDALONE_BINARY_PATH }} Publish-GitHub: @@ -158,37 +195,37 @@ jobs: uses: actions/download-artifact@v3 with: name: polywrap-linux-x64 - path: ./bin/polywrap-linux-x64 + path: ./bin - name: Download Artifacts linux-arm64 uses: actions/download-artifact@v3 with: name: polywrap-linux-arm64 - path: ./bin/polywrap-linux-arm64 + path: ./bin - name: Download Artifacts macos-x64 uses: actions/download-artifact@v3 with: name: polywrap-macos-x64 - path: ./bin/polywrap-macos-x64 + path: ./bin - name: Download Artifacts macos-arm64 uses: actions/download-artifact@v3 with: name: polywrap-macos-arm64 - path: ./bin/polywrap-macos-arm64 + path: ./bin - name: Download Artifacts win-x64 uses: actions/download-artifact@v3 with: - name: polywrap-win-x64 - path: ./bin/polywrap-win-x64 + name: polywrap-win-x64.exe + path: ./bin - name: Download Artifacts win-arm64 uses: actions/download-artifact@v3 with: - name: polywrap-win-arm64 - path: ./bin/polywrap-win-arm64 + name: polywrap-win-arm64.exe + path: ./bin - name: Create Release id: create_release @@ -204,13 +241,13 @@ jobs: ${{ github.event.pull_request.body }} draft: false prerelease: false - files: | + files: | ./bin/polywrap-linux-x64 ./bin/polywrap-linux-arm64 ./bin/polywrap-macos-x64 ./bin/polywrap-macos-arm64 - ./bin/polywrap-win-x64 - ./bin/polywrap-win-arm64 + ./bin/polywrap-win-x64.exe + ./bin/polywrap-win-arm64.exe - uses: actions/github-script@0.8.0 if: env.TAG_EXISTS == 'false' From 326f94466e38d37648e702e1cc94b1bc6e2f95ef Mon Sep 17 00:00:00 2001 From: Cesar Date: Wed, 13 Sep 2023 19:55:59 +0200 Subject: [PATCH 09/10] chore: remove debug logs from cli --- .github/workflows/ci-wrap-test-harness.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/ci-wrap-test-harness.yaml b/.github/workflows/ci-wrap-test-harness.yaml index b05f96b2b..5819a9024 100644 --- a/.github/workflows/ci-wrap-test-harness.yaml +++ b/.github/workflows/ci-wrap-test-harness.yaml @@ -102,12 +102,6 @@ jobs: restore-keys: | cargo-${{ runner.os }}-${{ github.job }} - - name: Log toolchain folders - run: ls toolchain - - - name: Log toolchain packages - run: ls toolchain/packages - - name: Set environment variable run: echo POLYWRAP_CLI_PATH=$(pwd)/toolchain/packages/cli >> $GITHUB_ENV From cfbb0227b56fcba3ce04c715fe39f94060d9236a Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Thu, 14 Sep 2023 00:22:32 +0200 Subject: [PATCH 10/10] chore: pre 0.12.0 --- CHANGELOG.md | 9 +++++++++ VERSION | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eecd37bf9..3e9aff3d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +# Polywrap Origin (0.12.0) +## Breaking Changes +**`@polywrap/schema-bind`:** +* [PR-1890](https://github.com/polywrap/cli/pull/1890) **Update `wasm/rust` Bindings to `v2`** + +## Bugs +**`polywrap` CLI:** +* [PR-1903](https://github.com/polywrap/cli/pull/1903) **Properly Publish Binary Release** + # Polywrap Origin (0.11.4) ## Features **`polywrap` CLI:** diff --git a/VERSION b/VERSION index aa3545de4..ac454c6a1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.11.4 \ No newline at end of file +0.12.0