From 22a8b4be184a071b582a0cec4521ecb7028dfb61 Mon Sep 17 00:00:00 2001 From: Scott Waye Date: Sat, 31 Aug 2024 18:25:04 -0500 Subject: [PATCH 01/11] build on linux --- .github/workflows/build.yml | 2 +- .gitignore | 1 + CONTRIBUTING.md | 2 +- Directory.Packages.props | 4 ++-- samples/calculator/Adder/Adder.csproj | 3 +++ .../CalculatorComposed/CalculatorComposed.csproj | 2 +- src/WasmComponent.Sdk/ImportInDev.proj | 2 +- src/WasmComponent.Sdk/WasmComponent.Sdk.csproj | 7 ++++--- src/WitBindgen/WitBindgen.csproj | 6 ++++-- test/E2ETest/PackageTest/PackageTest.csproj | 2 +- test/E2ETest/testapps/E2EConsumer/E2EConsumer.csproj | 3 ++- test/E2ETest/testapps/E2EProducer/E2EProducer.csproj | 3 ++- test/E2ETest/testapps/nuget.config | 4 ++-- .../testapps/SimpleConsumer/SimpleConsumer.csproj | 2 +- .../testapps/SimpleProducer/SimpleProducer.csproj | 2 ++ test/WasmtimeCliFetcher/FetchWasmtime.targets | 2 +- 16 files changed, 29 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bd91def..a101665 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,7 +26,7 @@ jobs: - name: Restore dependencies run: dotnet restore - name: Prepare WASM SDKs - run: dotnet msbuild src/WitBindgen/build/BytecodeAlliance.Componentize.DotNet.WitBindgen.targets /t:PrepareWasmSdks + run: dotnet msbuild src/WitBindgen/build/ByteCodeAlliance.Componentize.DotNet.WitBindgen.targets /t:PrepareWasmSdks - name: Build run: dotnet build --no-restore /p:BuildNumber=${{ github.run_number }} - name: Test diff --git a/.gitignore b/.gitignore index 863657b..1592880 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ obj/ .vs/ artifacts/ test/WasmComponentSdkTest/testapps/OciWit/wit +*.binlog diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ce25d16..52b4646 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,7 +9,7 @@ Requires [.NET 8+](https://dotnet.microsoft.com/en-us/download) ``` ## needed to avoid errors with multiple projects calling and downloading the sdks at same time (https://github.com/bytecodealliance/componentize-dotnet/issues/8) -dotnet msbuild src/WitBindgen/build/BytecodeAlliance.Componentize.DotNet.WitBindgen.targets /t:PrepareWasmSdks +dotnet msbuild src/WitBindgen/build/ByteCodeAlliance.Componentize.DotNet.WitBindgen.targets /t:PrepareWasmSdks dotnet build ``` diff --git a/Directory.Packages.props b/Directory.Packages.props index d946bd8..fc21d41 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -4,8 +4,8 @@ - - + + diff --git a/samples/calculator/Adder/Adder.csproj b/samples/calculator/Adder/Adder.csproj index 4bdb818..f33449c 100644 --- a/samples/calculator/Adder/Adder.csproj +++ b/samples/calculator/Adder/Adder.csproj @@ -11,6 +11,9 @@ true wasi-wasm + + + adder diff --git a/samples/calculator/CalculatorComposed/CalculatorComposed.csproj b/samples/calculator/CalculatorComposed/CalculatorComposed.csproj index c1d528f..4cfa6db 100644 --- a/samples/calculator/CalculatorComposed/CalculatorComposed.csproj +++ b/samples/calculator/CalculatorComposed/CalculatorComposed.csproj @@ -17,7 +17,7 @@ - ../CalculatorHost/bin/$(Configuration)/$(TargetFramework)/wasi-wasm/native/calculatorhost.wasm + ../CalculatorHost/bin/$(Configuration)/$(TargetFramework)/wasi-wasm/native/CalculatorHost.wasm ../Adder/bin/$(Configuration)/$(TargetFramework)/wasi-wasm/native/adder.wasm diff --git a/src/WasmComponent.Sdk/ImportInDev.proj b/src/WasmComponent.Sdk/ImportInDev.proj index 86e906a..51dc543 100644 --- a/src/WasmComponent.Sdk/ImportInDev.proj +++ b/src/WasmComponent.Sdk/ImportInDev.proj @@ -7,6 +7,6 @@ - + diff --git a/src/WasmComponent.Sdk/WasmComponent.Sdk.csproj b/src/WasmComponent.Sdk/WasmComponent.Sdk.csproj index 519b79d..67e14bc 100644 --- a/src/WasmComponent.Sdk/WasmComponent.Sdk.csproj +++ b/src/WasmComponent.Sdk/WasmComponent.Sdk.csproj @@ -1,5 +1,5 @@  - + BytecodeAlliance.Componentize.DotNet.Wasm.SDK @@ -32,7 +32,7 @@ - + @@ -67,7 +67,8 @@ - + + diff --git a/src/WitBindgen/WitBindgen.csproj b/src/WitBindgen/WitBindgen.csproj index a92eceb..311d73a 100644 --- a/src/WitBindgen/WitBindgen.csproj +++ b/src/WitBindgen/WitBindgen.csproj @@ -1,5 +1,5 @@  - + BytecodeAlliance.Componentize.DotNet.WitBindgen @@ -62,7 +62,8 @@ - + + @@ -79,6 +80,7 @@ + diff --git a/test/E2ETest/PackageTest/PackageTest.csproj b/test/E2ETest/PackageTest/PackageTest.csproj index 8509b2b..a94f4f9 100644 --- a/test/E2ETest/PackageTest/PackageTest.csproj +++ b/test/E2ETest/PackageTest/PackageTest.csproj @@ -38,7 +38,7 @@ - + diff --git a/test/E2ETest/testapps/E2EConsumer/E2EConsumer.csproj b/test/E2ETest/testapps/E2EConsumer/E2EConsumer.csproj index 676b5c4..3a1796b 100644 --- a/test/E2ETest/testapps/E2EConsumer/E2EConsumer.csproj +++ b/test/E2ETest/testapps/E2EConsumer/E2EConsumer.csproj @@ -13,10 +13,11 @@ wasi-wasm false true + e2econsumer - + diff --git a/test/E2ETest/testapps/E2EProducer/E2EProducer.csproj b/test/E2ETest/testapps/E2EProducer/E2EProducer.csproj index a29197f..0335116 100644 --- a/test/E2ETest/testapps/E2EProducer/E2EProducer.csproj +++ b/test/E2ETest/testapps/E2EProducer/E2EProducer.csproj @@ -11,10 +11,11 @@ true wasi-wasm true + e2eproducer - + diff --git a/test/E2ETest/testapps/nuget.config b/test/E2ETest/testapps/nuget.config index 3fb15a2..b3330dd 100644 --- a/test/E2ETest/testapps/nuget.config +++ b/test/E2ETest/testapps/nuget.config @@ -5,8 +5,8 @@ - - + + diff --git a/test/WasmComponentSdkTest/testapps/SimpleConsumer/SimpleConsumer.csproj b/test/WasmComponentSdkTest/testapps/SimpleConsumer/SimpleConsumer.csproj index fba60f0..cf8cc74 100644 --- a/test/WasmComponentSdkTest/testapps/SimpleConsumer/SimpleConsumer.csproj +++ b/test/WasmComponentSdkTest/testapps/SimpleConsumer/SimpleConsumer.csproj @@ -31,7 +31,7 @@ - + diff --git a/test/WasmComponentSdkTest/testapps/SimpleProducer/SimpleProducer.csproj b/test/WasmComponentSdkTest/testapps/SimpleProducer/SimpleProducer.csproj index 48da1e2..ecab52f 100644 --- a/test/WasmComponentSdkTest/testapps/SimpleProducer/SimpleProducer.csproj +++ b/test/WasmComponentSdkTest/testapps/SimpleProducer/SimpleProducer.csproj @@ -10,6 +10,8 @@ true wasi-wasm + + simpleproducer diff --git a/test/WasmtimeCliFetcher/FetchWasmtime.targets b/test/WasmtimeCliFetcher/FetchWasmtime.targets index 5a4dd36..50d62e9 100644 --- a/test/WasmtimeCliFetcher/FetchWasmtime.targets +++ b/test/WasmtimeCliFetcher/FetchWasmtime.targets @@ -14,7 +14,7 @@ $(MSBuildThisFileDirectory)tools\version-$(WasmtimeVersion) - .tar.gz + .tar.xz .zip https://github.com/bytecodealliance/wasmtime/releases/download/v$(WasmtimeVersion)/wasmtime-v$(WasmtimeVersion)-$(WasmtimeTarget)$(WasmtimeUrlExtension) From c334eb137288b30bc24fc562be8dcd0f83661e97 Mon Sep 17 00:00:00 2001 From: Scott Waye Date: Sat, 31 Aug 2024 20:21:11 -0500 Subject: [PATCH 02/11] remove package mapping --- test/E2ETest/testapps/nuget.config | 6 ------ 1 file changed, 6 deletions(-) diff --git a/test/E2ETest/testapps/nuget.config b/test/E2ETest/testapps/nuget.config index b3330dd..73a9ba5 100644 --- a/test/E2ETest/testapps/nuget.config +++ b/test/E2ETest/testapps/nuget.config @@ -3,10 +3,4 @@ - - - - - - From 4b2209a08d4e1ac519b318e46bcf65f6a4b1f8c4 Mon Sep 17 00:00:00 2001 From: Scott Waye Date: Mon, 2 Sep 2024 19:37:23 -0500 Subject: [PATCH 03/11] Add linux to yml, lowercase more component names --- .github/workflows/build.yml | 4 +++- .../WasmComponentSdkTest/SimpleProducerConsumerTest.cs | 5 +++++ .../testapps/AppWithWitFolder/AppWithWitFolder.csproj | 1 + test/WasmComponentSdkTest/testapps/OciWit/OciWit.csproj | 1 + .../testapps/SimpleConsumer/SimpleConsumer.csproj | 1 + test/WitBindgenTest/WitBindgenTest/CodeGenerationTest.cs | 4 +++- 6 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a101665..c23c679 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,11 +12,12 @@ on: jobs: build: - runs-on: windows-latest + runs-on: {{ matrix.os }} name: Build with Dotnet ${{ matrix.dotnet }} strategy: matrix: dotnet: [ '8.x', '9.0.100-preview.4.24267.66'] + os: [ubuntu-latest, windows-latest] steps: - uses: actions/checkout@v4 - name: Setup .NET @@ -40,3 +41,4 @@ jobs: path: artifacts/*.nupkg if-no-files-found: error if: ${{ matrix.dotnet == '8.x' }} # only need one package published https://github.com/actions/upload-artifact?tab=readme-ov-file#not-uploading-to-the-same-artifact + diff --git a/test/WasmComponentSdkTest/WasmComponentSdkTest/SimpleProducerConsumerTest.cs b/test/WasmComponentSdkTest/WasmComponentSdkTest/SimpleProducerConsumerTest.cs index cb73d77..ba08a91 100644 --- a/test/WasmComponentSdkTest/WasmComponentSdkTest/SimpleProducerConsumerTest.cs +++ b/test/WasmComponentSdkTest/WasmComponentSdkTest/SimpleProducerConsumerTest.cs @@ -89,6 +89,11 @@ private static string FindModulePath(string searchDir, string filename) } var matches = Directory.GetFiles(resolvedSearchDir, filename, SearchOption.AllDirectories); + if (matches.Count() != 1) + { + throw new Exception($"Failed to get modules path, matched {matches.Count()} entries for directory {resolvedSearchDir} and filename {filename}."); + } + return Path.GetFullPath(matches.Single()); } } diff --git a/test/WasmComponentSdkTest/testapps/AppWithWitFolder/AppWithWitFolder.csproj b/test/WasmComponentSdkTest/testapps/AppWithWitFolder/AppWithWitFolder.csproj index 7962b9c..0120f43 100644 --- a/test/WasmComponentSdkTest/testapps/AppWithWitFolder/AppWithWitFolder.csproj +++ b/test/WasmComponentSdkTest/testapps/AppWithWitFolder/AppWithWitFolder.csproj @@ -11,6 +11,7 @@ true wasi-wasm + appwithwitfolder diff --git a/test/WasmComponentSdkTest/testapps/OciWit/OciWit.csproj b/test/WasmComponentSdkTest/testapps/OciWit/OciWit.csproj index d19847a..89cb397 100644 --- a/test/WasmComponentSdkTest/testapps/OciWit/OciWit.csproj +++ b/test/WasmComponentSdkTest/testapps/OciWit/OciWit.csproj @@ -9,6 +9,7 @@ true wasi-wasm + ociwit diff --git a/test/WasmComponentSdkTest/testapps/SimpleConsumer/SimpleConsumer.csproj b/test/WasmComponentSdkTest/testapps/SimpleConsumer/SimpleConsumer.csproj index cf8cc74..bb390be 100644 --- a/test/WasmComponentSdkTest/testapps/SimpleConsumer/SimpleConsumer.csproj +++ b/test/WasmComponentSdkTest/testapps/SimpleConsumer/SimpleConsumer.csproj @@ -11,6 +11,7 @@ true wasi-wasm + simpleconsumer diff --git a/test/WitBindgenTest/WitBindgenTest/CodeGenerationTest.cs b/test/WitBindgenTest/WitBindgenTest/CodeGenerationTest.cs index b449260..576dc10 100644 --- a/test/WitBindgenTest/WitBindgenTest/CodeGenerationTest.cs +++ b/test/WitBindgenTest/WitBindgenTest/CodeGenerationTest.cs @@ -1,5 +1,6 @@ using MyFuncsWorld; using ProducerWorld; +using System; using Xunit; namespace WitBindgenTest; @@ -14,7 +15,8 @@ public void GeneratesSimpleImport() LibraryUsingWit.Code.CallSimpleDoSomething()); // Currently, it generates [DllImport("*", ...)] so validate that - Assert.StartsWith("Unable to load DLL", ex.Message); + var expectedErrorMessagePrefix = "Unable to load " + (OperatingSystem.IsWindows() ? "DLL" : "shared library"); + Assert.StartsWith(expectedErrorMessagePrefix, ex.Message); } [Fact] From 601657b6fc2f7c0bddaeaa14fb2dcc1d4fcd1a7c Mon Sep 17 00:00:00 2001 From: Scott Waye Date: Mon, 2 Sep 2024 19:50:15 -0500 Subject: [PATCH 04/11] syntax --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c23c679..e1215c6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ on: jobs: build: - runs-on: {{ matrix.os }} + runs-on: ${{ matrix.os }} name: Build with Dotnet ${{ matrix.dotnet }} strategy: matrix: From 534047e15d7c0ed5158abf0cfd0b9707cba9ed90 Mon Sep 17 00:00:00 2001 From: Scott Waye Date: Mon, 2 Sep 2024 19:57:41 -0500 Subject: [PATCH 05/11] name artifacts with os --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e1215c6..689c2a9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ on: jobs: build: runs-on: ${{ matrix.os }} - name: Build with Dotnet ${{ matrix.dotnet }} + name: Build on ${{ matrix.os }} with Dotnet ${{ matrix.dotnet }} strategy: matrix: dotnet: [ '8.x', '9.0.100-preview.4.24267.66'] @@ -37,7 +37,7 @@ jobs: - name: Upload artifacts uses: actions/upload-artifact@v4 with: - name: nuget-packages + name: nuget-packages-${{ martix.os }} path: artifacts/*.nupkg if-no-files-found: error if: ${{ matrix.dotnet == '8.x' }} # only need one package published https://github.com/actions/upload-artifact?tab=readme-ov-file#not-uploading-to-the-same-artifact From acb0d2c729afa6868aceb4b077c89afa31842264 Mon Sep 17 00:00:00 2001 From: Scott Waye Date: Mon, 2 Sep 2024 19:59:58 -0500 Subject: [PATCH 06/11] name artifacts with os typo --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 689c2a9..b595169 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,7 +37,7 @@ jobs: - name: Upload artifacts uses: actions/upload-artifact@v4 with: - name: nuget-packages-${{ martix.os }} + name: nuget-packages-${{ matrix.os }} path: artifacts/*.nupkg if-no-files-found: error if: ${{ matrix.dotnet == '8.x' }} # only need one package published https://github.com/actions/upload-artifact?tab=readme-ov-file#not-uploading-to-the-same-artifact From eb3381c817395602df62efef82bc9ae5f65b9de6 Mon Sep 17 00:00:00 2001 From: Scott Waye Date: Tue, 3 Sep 2024 19:32:37 -0500 Subject: [PATCH 07/11] address some feedback, Bytecode case, prepare for Mac --- .github/workflows/build.yml | 2 +- CONTRIBUTING.md | 2 +- .../WasmComponent.Sdk.csproj | 2 +- ...lliance.Componentize.DotNet.Wasm.SDK.props | 14 --- ...iance.Componentize.DotNet.Wasm.SDK.targets | 6 -- src/WitBindgen/WitBindgen.csproj | 4 +- ...iance.Componentize.DotNet.WitBindgen.props | 34 ------- ...nce.Componentize.DotNet.WitBindgen.targets | 98 ------------------- .../testapps/E2EConsumer/E2EConsumer.csproj | 2 +- .../testapps/E2EProducer/E2EProducer.csproj | 2 +- 10 files changed, 7 insertions(+), 159 deletions(-) delete mode 100644 src/WasmComponent.Sdk/build/ByteCodeAlliance.Componentize.DotNet.Wasm.SDK.props delete mode 100644 src/WasmComponent.Sdk/build/ByteCodeAlliance.Componentize.DotNet.Wasm.SDK.targets delete mode 100644 src/WitBindgen/build/ByteCodeAlliance.Componentize.DotNet.WitBindgen.props delete mode 100644 src/WitBindgen/build/ByteCodeAlliance.Componentize.DotNet.WitBindgen.targets diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b595169..af89225 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,7 +27,7 @@ jobs: - name: Restore dependencies run: dotnet restore - name: Prepare WASM SDKs - run: dotnet msbuild src/WitBindgen/build/ByteCodeAlliance.Componentize.DotNet.WitBindgen.targets /t:PrepareWasmSdks + run: dotnet msbuild src/WitBindgen/build/BytecodeAlliance.Componentize.DotNet.WitBindgen.targets /t:PrepareWasmSdks - name: Build run: dotnet build --no-restore /p:BuildNumber=${{ github.run_number }} - name: Test diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 52b4646..ce25d16 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,7 +9,7 @@ Requires [.NET 8+](https://dotnet.microsoft.com/en-us/download) ``` ## needed to avoid errors with multiple projects calling and downloading the sdks at same time (https://github.com/bytecodealliance/componentize-dotnet/issues/8) -dotnet msbuild src/WitBindgen/build/ByteCodeAlliance.Componentize.DotNet.WitBindgen.targets /t:PrepareWasmSdks +dotnet msbuild src/WitBindgen/build/BytecodeAlliance.Componentize.DotNet.WitBindgen.targets /t:PrepareWasmSdks dotnet build ``` diff --git a/src/WasmComponent.Sdk/WasmComponent.Sdk.csproj b/src/WasmComponent.Sdk/WasmComponent.Sdk.csproj index 67e14bc..0253ea6 100644 --- a/src/WasmComponent.Sdk/WasmComponent.Sdk.csproj +++ b/src/WasmComponent.Sdk/WasmComponent.Sdk.csproj @@ -1,5 +1,5 @@  - + BytecodeAlliance.Componentize.DotNet.Wasm.SDK diff --git a/src/WasmComponent.Sdk/build/ByteCodeAlliance.Componentize.DotNet.Wasm.SDK.props b/src/WasmComponent.Sdk/build/ByteCodeAlliance.Componentize.DotNet.Wasm.SDK.props deleted file mode 100644 index dda6cd2..0000000 --- a/src/WasmComponent.Sdk/build/ByteCodeAlliance.Componentize.DotNet.Wasm.SDK.props +++ /dev/null @@ -1,14 +0,0 @@ - - - true - false - false - - win - linux - osx - $(WasmToolsTarget)-$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLower()) - $(MSBuildThisFileDirectory)..\tools\$(WasmToolsTarget)\wasm-tools - $(WasmToolsExe).exe - - diff --git a/src/WasmComponent.Sdk/build/ByteCodeAlliance.Componentize.DotNet.Wasm.SDK.targets b/src/WasmComponent.Sdk/build/ByteCodeAlliance.Componentize.DotNet.Wasm.SDK.targets deleted file mode 100644 index 4f10238..0000000 --- a/src/WasmComponent.Sdk/build/ByteCodeAlliance.Componentize.DotNet.Wasm.SDK.targets +++ /dev/null @@ -1,6 +0,0 @@ - - - - - diff --git a/src/WitBindgen/WitBindgen.csproj b/src/WitBindgen/WitBindgen.csproj index 311d73a..7858156 100644 --- a/src/WitBindgen/WitBindgen.csproj +++ b/src/WitBindgen/WitBindgen.csproj @@ -1,5 +1,5 @@  - + BytecodeAlliance.Componentize.DotNet.WitBindgen @@ -80,7 +80,7 @@ - + diff --git a/src/WitBindgen/build/ByteCodeAlliance.Componentize.DotNet.WitBindgen.props b/src/WitBindgen/build/ByteCodeAlliance.Componentize.DotNet.WitBindgen.props deleted file mode 100644 index 31aa3a6..0000000 --- a/src/WitBindgen/build/ByteCodeAlliance.Componentize.DotNet.WitBindgen.props +++ /dev/null @@ -1,34 +0,0 @@ - - - win - linux - osx - $(WitBindgenToolTarget)-$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLower()) - $(MSBuildThisFileDirectory)..\tools\$(WitBindgenToolTarget)\wit-bindgen - $(WitBindgenExe).exe - $(MSBuildThisFileDirectory)..\tools\$(WitBindgenToolTarget)\wkg - $(WkgExe).exe - - - - true - - - - - - MSBuild:Compile - - - - - - File;BrowseObject - - - - - - - - diff --git a/src/WitBindgen/build/ByteCodeAlliance.Componentize.DotNet.WitBindgen.targets b/src/WitBindgen/build/ByteCodeAlliance.Componentize.DotNet.WitBindgen.targets deleted file mode 100644 index 7a60a74..0000000 --- a/src/WitBindgen/build/ByteCodeAlliance.Componentize.DotNet.WitBindgen.targets +++ /dev/null @@ -1,98 +0,0 @@ - - - native-aot - - - 24.0 - https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$(WasiSdkVersion.Split(".")[0])/wasi-sdk-$(WasiSdkVersion)-x86_64-windows.tar.gz - https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$(WasiSdkVersion.Split(".")[0])/wasi-sdk-$(WasiSdkVersion)-x86_64-linux.tar.gz - https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$(WasiSdkVersion.Split(".")[0])/wasi-sdk-$(WasiSdkVersion)-x86_64-macos.tar.gz - $([System.IO.Path]::Combine("$([System.Environment]::GetFolderPath(SpecialFolder.UserProfile))", ".wasi-sdk", "wasi-sdk-$(WasiSdkVersion)")) - - - - - - - $(WasiSdkRoot) - - - - - - $([System.IO.Path]::Combine($([System.IO.Path]::GetTempPath()), $([System.IO.Path]::GetRandomFileName()))) - - - - - - - - - - - - - - - - - - - - - - - - @(Wit) - - - - - - - - - - - - - - - - - - - - $(IntermediateOutputPath)wit_bindgen\ - - - - - --world %(Wit.World) - - - - - - - - - - - - - - - - - diff --git a/test/E2ETest/testapps/E2EConsumer/E2EConsumer.csproj b/test/E2ETest/testapps/E2EConsumer/E2EConsumer.csproj index 3a1796b..806e33b 100644 --- a/test/E2ETest/testapps/E2EConsumer/E2EConsumer.csproj +++ b/test/E2ETest/testapps/E2EConsumer/E2EConsumer.csproj @@ -17,7 +17,7 @@ - + diff --git a/test/E2ETest/testapps/E2EProducer/E2EProducer.csproj b/test/E2ETest/testapps/E2EProducer/E2EProducer.csproj index 0335116..141022c 100644 --- a/test/E2ETest/testapps/E2EProducer/E2EProducer.csproj +++ b/test/E2ETest/testapps/E2EProducer/E2EProducer.csproj @@ -15,7 +15,7 @@ - + From 28db2150c7444b0d2b7b6a55d322e9729d7671af Mon Sep 17 00:00:00 2001 From: Scott Waye Date: Tue, 3 Sep 2024 19:50:34 -0500 Subject: [PATCH 08/11] add back Bytecode files --- ...lliance.Componentize.DotNet.Wasm.SDK.props | 14 +++ ...iance.Componentize.DotNet.Wasm.SDK.targets | 6 ++ ...iance.Componentize.DotNet.WitBindgen.props | 34 +++++++ ...nce.Componentize.DotNet.WitBindgen.targets | 98 +++++++++++++++++++ 4 files changed, 152 insertions(+) create mode 100644 src/WasmComponent.Sdk/build/BytecodeAlliance.Componentize.DotNet.Wasm.SDK.props create mode 100644 src/WasmComponent.Sdk/build/BytecodeAlliance.Componentize.DotNet.Wasm.SDK.targets create mode 100644 src/WitBindgen/build/BytecodeAlliance.Componentize.DotNet.WitBindgen.props create mode 100644 src/WitBindgen/build/BytecodeAlliance.Componentize.DotNet.WitBindgen.targets diff --git a/src/WasmComponent.Sdk/build/BytecodeAlliance.Componentize.DotNet.Wasm.SDK.props b/src/WasmComponent.Sdk/build/BytecodeAlliance.Componentize.DotNet.Wasm.SDK.props new file mode 100644 index 0000000..dda6cd2 --- /dev/null +++ b/src/WasmComponent.Sdk/build/BytecodeAlliance.Componentize.DotNet.Wasm.SDK.props @@ -0,0 +1,14 @@ + + + true + false + false + + win + linux + osx + $(WasmToolsTarget)-$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLower()) + $(MSBuildThisFileDirectory)..\tools\$(WasmToolsTarget)\wasm-tools + $(WasmToolsExe).exe + + diff --git a/src/WasmComponent.Sdk/build/BytecodeAlliance.Componentize.DotNet.Wasm.SDK.targets b/src/WasmComponent.Sdk/build/BytecodeAlliance.Componentize.DotNet.Wasm.SDK.targets new file mode 100644 index 0000000..4f10238 --- /dev/null +++ b/src/WasmComponent.Sdk/build/BytecodeAlliance.Componentize.DotNet.Wasm.SDK.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/src/WitBindgen/build/BytecodeAlliance.Componentize.DotNet.WitBindgen.props b/src/WitBindgen/build/BytecodeAlliance.Componentize.DotNet.WitBindgen.props new file mode 100644 index 0000000..31aa3a6 --- /dev/null +++ b/src/WitBindgen/build/BytecodeAlliance.Componentize.DotNet.WitBindgen.props @@ -0,0 +1,34 @@ + + + win + linux + osx + $(WitBindgenToolTarget)-$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLower()) + $(MSBuildThisFileDirectory)..\tools\$(WitBindgenToolTarget)\wit-bindgen + $(WitBindgenExe).exe + $(MSBuildThisFileDirectory)..\tools\$(WitBindgenToolTarget)\wkg + $(WkgExe).exe + + + + true + + + + + + MSBuild:Compile + + + + + + File;BrowseObject + + + + + + + + diff --git a/src/WitBindgen/build/BytecodeAlliance.Componentize.DotNet.WitBindgen.targets b/src/WitBindgen/build/BytecodeAlliance.Componentize.DotNet.WitBindgen.targets new file mode 100644 index 0000000..7a60a74 --- /dev/null +++ b/src/WitBindgen/build/BytecodeAlliance.Componentize.DotNet.WitBindgen.targets @@ -0,0 +1,98 @@ + + + native-aot + + + 24.0 + https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$(WasiSdkVersion.Split(".")[0])/wasi-sdk-$(WasiSdkVersion)-x86_64-windows.tar.gz + https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$(WasiSdkVersion.Split(".")[0])/wasi-sdk-$(WasiSdkVersion)-x86_64-linux.tar.gz + https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$(WasiSdkVersion.Split(".")[0])/wasi-sdk-$(WasiSdkVersion)-x86_64-macos.tar.gz + $([System.IO.Path]::Combine("$([System.Environment]::GetFolderPath(SpecialFolder.UserProfile))", ".wasi-sdk", "wasi-sdk-$(WasiSdkVersion)")) + + + + + + + $(WasiSdkRoot) + + + + + + $([System.IO.Path]::Combine($([System.IO.Path]::GetTempPath()), $([System.IO.Path]::GetRandomFileName()))) + + + + + + + + + + + + + + + + + + + + + + + + @(Wit) + + + + + + + + + + + + + + + + + + + + $(IntermediateOutputPath)wit_bindgen\ + + + + + --world %(Wit.World) + + + + + + + + + + + + + + + + + From 12f64dab384c1b3d322861d84fa30d592a748de4 Mon Sep 17 00:00:00 2001 From: Scott Waye Date: Tue, 3 Sep 2024 20:06:27 -0500 Subject: [PATCH 09/11] add comment about zip packaging on Linux --- src/WasmComponent.Sdk/WasmComponent.Sdk.csproj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/WasmComponent.Sdk/WasmComponent.Sdk.csproj b/src/WasmComponent.Sdk/WasmComponent.Sdk.csproj index 0253ea6..d09c663 100644 --- a/src/WasmComponent.Sdk/WasmComponent.Sdk.csproj +++ b/src/WasmComponent.Sdk/WasmComponent.Sdk.csproj @@ -67,7 +67,8 @@ - + From b9c4cc2cb2feb183d74a8246ec7d7a838d9c6934 Mon Sep 17 00:00:00 2001 From: Scott Waye Date: Wed, 4 Sep 2024 19:54:44 -0500 Subject: [PATCH 10/11] add back packageSourceMapping --- test/E2ETest/testapps/nuget.config | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/E2ETest/testapps/nuget.config b/test/E2ETest/testapps/nuget.config index 73a9ba5..3fb15a2 100644 --- a/test/E2ETest/testapps/nuget.config +++ b/test/E2ETest/testapps/nuget.config @@ -3,4 +3,10 @@ + + + + + + From 94b6fe245fa84345cbeb846adf15838c6a1478b3 Mon Sep 17 00:00:00 2001 From: Scott Waye Date: Fri, 6 Sep 2024 17:39:02 -0500 Subject: [PATCH 11/11] try forward slash --- test/E2ETest/testapps/nuget.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/E2ETest/testapps/nuget.config b/test/E2ETest/testapps/nuget.config index 3fb15a2..40f6b38 100644 --- a/test/E2ETest/testapps/nuget.config +++ b/test/E2ETest/testapps/nuget.config @@ -1,7 +1,7 @@ - +