diff --git a/Directory.Packages.props b/Directory.Packages.props index 93ccefc..d946bd8 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -4,8 +4,8 @@ - - + + diff --git a/README.md b/README.md index a399fbd..6d1c46b 100644 --- a/README.md +++ b/README.md @@ -101,12 +101,6 @@ Another option, if you use Visual Studio, is to select the WIT file in *Solution You can simply type the world name `hostapp` into the properties pane. -For now, you must also specify the functions you want to import in the `.csproj` file. Add this to the `ItemGroup`: - -```xml - -``` - Now you can call the imported `Add` function by putting the following in `Program.cs`: ```cs diff --git a/samples/calculator/CalculatorComposed/CalculatorComposed.csproj b/samples/calculator/CalculatorComposed/CalculatorComposed.csproj index 6ecf788..c1d528f 100644 --- a/samples/calculator/CalculatorComposed/CalculatorComposed.csproj +++ b/samples/calculator/CalculatorComposed/CalculatorComposed.csproj @@ -15,10 +15,10 @@ - + - ../CalculatorHost/bin/$(Configuration)/$(TargetFramework)/wasi-wasm/native/calculatorhost-component.wasm - ../Adder/bin/$(Configuration)/$(TargetFramework)/wasi-wasm/native/adder-component.wasm + ../CalculatorHost/bin/$(Configuration)/$(TargetFramework)/wasi-wasm/native/calculatorhost.wasm + ../Adder/bin/$(Configuration)/$(TargetFramework)/wasi-wasm/native/adder.wasm diff --git a/samples/calculator/CalculatorHost/CalculatorHost.csproj b/samples/calculator/CalculatorHost/CalculatorHost.csproj index 5b7b681..630d40c 100644 --- a/samples/calculator/CalculatorHost/CalculatorHost.csproj +++ b/samples/calculator/CalculatorHost/CalculatorHost.csproj @@ -20,11 +20,6 @@ - - - - - diff --git a/src/WasmComponent.Sdk/WasmComponent.Sdk.csproj b/src/WasmComponent.Sdk/WasmComponent.Sdk.csproj index 7ad2f13..519b79d 100644 --- a/src/WasmComponent.Sdk/WasmComponent.Sdk.csproj +++ b/src/WasmComponent.Sdk/WasmComponent.Sdk.csproj @@ -44,7 +44,7 @@ - + @@ -81,12 +81,6 @@ - - - - - - <_PackageFiles Include="build\**" BuildAction="Content" PackagePath="build" /> diff --git a/src/WasmComponent.Sdk/build/ByteCodeAlliance.Componentize.DotNet.Wasm.SDK.targets b/src/WasmComponent.Sdk/build/ByteCodeAlliance.Componentize.DotNet.Wasm.SDK.targets index 732d1b6..4f10238 100644 --- a/src/WasmComponent.Sdk/build/ByteCodeAlliance.Componentize.DotNet.Wasm.SDK.targets +++ b/src/WasmComponent.Sdk/build/ByteCodeAlliance.Componentize.DotNet.Wasm.SDK.targets @@ -1,23 +1,6 @@ - - - - - - - - - - - reactor - command - $(MSBuildThisFileDirectory)../tools/wasi-wasm/wasi_snapshot_preview1.$(WasiPreview1AdapterType).wasm - - $(NativeOutputPath)$(TargetName.ToLower())-component.wasm - + diff --git a/src/WitBindgen/WitBindgen.csproj b/src/WitBindgen/WitBindgen.csproj index 0b8fdad..a92eceb 100644 --- a/src/WitBindgen/WitBindgen.csproj +++ b/src/WitBindgen/WitBindgen.csproj @@ -19,7 +19,7 @@ false - 0.29.0 + 0.30.0 https://github.com/bytecodealliance/wit-bindgen/releases/download/v$(PrebuiltWitBindgenVersion)/wit-bindgen-$(PrebuiltWitBindgenVersion) $(MSBuildThisFileDirectory)..\..\modules\wit-bindgen\ diff --git a/src/WitBindgen/build/ByteCodeAlliance.Componentize.DotNet.WitBindgen.props b/src/WitBindgen/build/ByteCodeAlliance.Componentize.DotNet.WitBindgen.props index e67f4d0..31aa3a6 100644 --- a/src/WitBindgen/build/ByteCodeAlliance.Componentize.DotNet.WitBindgen.props +++ b/src/WitBindgen/build/ByteCodeAlliance.Componentize.DotNet.WitBindgen.props @@ -26,7 +26,7 @@ File;BrowseObject - + diff --git a/src/WitBindgen/build/ByteCodeAlliance.Componentize.DotNet.WitBindgen.targets b/src/WitBindgen/build/ByteCodeAlliance.Componentize.DotNet.WitBindgen.targets index db39ff0..7a60a74 100644 --- a/src/WitBindgen/build/ByteCodeAlliance.Componentize.DotNet.WitBindgen.targets +++ b/src/WitBindgen/build/ByteCodeAlliance.Componentize.DotNet.WitBindgen.targets @@ -1,12 +1,12 @@ - + native-aot - 22.0 - https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$(WasiSdkVersion.Split(".")[0])/wasi-sdk-$(WasiSdkVersion).m-mingw64.tar.gz - https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$(WasiSdkVersion.Split(".")[0])/wasi-sdk-$(WasiSdkVersion)-linux.tar.gz - https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$(WasiSdkVersion.Split(".")[0])/wasi-sdk-$(WasiSdkVersion)-macos.tar.gz + 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)")) @@ -17,9 +17,6 @@ --> - clang - $(ClangExeName).exe - $(WasiSdkRoot)\bin\$(ClangExeName) $(WasiSdkRoot) @@ -46,16 +43,15 @@ - - - + @(Wit) @@ -64,16 +60,21 @@ - - - $(IntermediateOutputPath)wit_bindgen\ - + + + + + + + + $(IntermediateOutputPath)wit_bindgen\ + @@ -87,13 +88,6 @@ - - - - - - - diff --git a/test/E2ETest/testapps/E2EConsumer/E2EConsumer.csproj b/test/E2ETest/testapps/E2EConsumer/E2EConsumer.csproj index a6b7ab5..676b5c4 100644 --- a/test/E2ETest/testapps/E2EConsumer/E2EConsumer.csproj +++ b/test/E2ETest/testapps/E2EConsumer/E2EConsumer.csproj @@ -24,20 +24,16 @@ - - - - - + - ../E2EProducer/bin/$(Configuration)/$(TargetFramework)/wasi-wasm/native/e2eproducer-component.wasm + ../E2EProducer/bin/$(Configuration)/$(TargetFramework)/wasi-wasm/native/e2eproducer.wasm - + diff --git a/test/WasmComponentSdkTest/WasmComponentSdkTest/SimpleProducerConsumerTest.cs b/test/WasmComponentSdkTest/WasmComponentSdkTest/SimpleProducerConsumerTest.cs index 3e3724f..cb73d77 100644 --- a/test/WasmComponentSdkTest/WasmComponentSdkTest/SimpleProducerConsumerTest.cs +++ b/test/WasmComponentSdkTest/WasmComponentSdkTest/SimpleProducerConsumerTest.cs @@ -19,21 +19,21 @@ public class SimpleProducerConsumerTest [Fact] public void CanBuildComponentWithImport() { - var witInfo = GetWitInfo(FindModulePath($"../testapps/SimpleConsumer/bin/{Config}", "simpleconsumer-component.wasm")); + var witInfo = GetWitInfo(FindModulePath($"../testapps/SimpleConsumer/bin/{Config}", "simpleconsumer.wasm")); Assert.Contains("import test:producer-consumer/operations", witInfo); } [Fact] public void CanBuildComponentWithExport() { - var witInfo = GetWitInfo(FindModulePath($"../testapps/SimpleProducer/bin/{Config}", "simpleproducer-component.wasm")); + var witInfo = GetWitInfo(FindModulePath($"../testapps/SimpleProducer/bin/{Config}", "simpleproducer.wasm")); Assert.Contains("export test:producer-consumer/operations", witInfo); } [Fact] public void CanBuildComponentWithWitPackage() { - var witInfo = GetWitInfo(FindModulePath($"../testapps/AppWithWitFolder/bin/{Config}", "appwithwitfolder-component.wasm")); + var witInfo = GetWitInfo(FindModulePath($"../testapps/AppWithWitFolder/bin/{Config}", "appwithwitfolder.wasm")); Assert.Contains("import test:pkg/folder", witInfo); } @@ -49,7 +49,7 @@ public void CanComposeImportWithExport() [Fact] public void CanBuildAppFromOci() { - var composed = FindModulePath("../testapps/OciWit", "ociwit-component.wasm"); + var composed = FindModulePath("../testapps/OciWit", "ociwit.wasm"); var stdout = ExecuteCommandComponent(composed); Assert.StartsWith("Oci is awesome!", stdout); } diff --git a/test/WasmComponentSdkTest/testapps/SimpleConsumer/SimpleConsumer.csproj b/test/WasmComponentSdkTest/testapps/SimpleConsumer/SimpleConsumer.csproj index dee9ac3..fba60f0 100644 --- a/test/WasmComponentSdkTest/testapps/SimpleConsumer/SimpleConsumer.csproj +++ b/test/WasmComponentSdkTest/testapps/SimpleConsumer/SimpleConsumer.csproj @@ -22,20 +22,16 @@ - - - - - + - ../SimpleProducer/bin/$(Configuration)/$(TargetFramework)/wasi-wasm/native/simpleproducer-component.wasm + ../SimpleProducer/bin/$(Configuration)/$(TargetFramework)/wasi-wasm/native/simpleproducer.wasm - +