-
Notifications
You must be signed in to change notification settings - Fork 9
/
E2EConsumer.csproj
41 lines (32 loc) · 1.8 KB
/
E2EConsumer.csproj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<Project Sdk="Microsoft.NET.Sdk">
<!-- This project can't be included in the solution because its package reference can't be satisfied except when running under test -->
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
<InvariantGlobalization>true</InvariantGlobalization>
<RuntimeIdentifier>wasi-wasm</RuntimeIdentifier>
<UseAppHost>false</UseAppHost>
<PublishTrimmed>true</PublishTrimmed>
<TargetName>e2econsumer</TargetName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BytecodeAlliance.Componentize.DotNet.Wasm.SDK" Version="$(PackageVersion)" />
<PackageReference Include="runtime.$(NETCoreSdkPortableRuntimeIdentifier).Microsoft.DotNet.ILCompiler.LLVM" Version="10.0.0-alpha.1.24573.1"/>
<!-- Just to ensure build order -->
<ProjectReference Include="..\E2EProducer\E2EProducer.csproj" ReferenceOutputAssembly="false" />
</ItemGroup>
<ItemGroup>
<Wit Include="..\E2EProducer\producer-consumer.wit" World="consumer" />
</ItemGroup>
<!-- After build, create the composed component so it can be executed in the test -->
<Target Name="ComposeWasmComponent" AfterTargets="Publish">
<PropertyGroup>
<DependencyComponent>../E2EProducer/bin/$(Configuration)/$(TargetFramework)/wasi-wasm/native/e2eproducer.wasm</DependencyComponent>
</PropertyGroup>
<MakeDir Directories="dist" />
<Exec Command="$(WasmToolsExe) compose -o dist/composed.wasm $(NativeOutputPath)$(TargetName.ToLower()).wasm -d $(DependencyComponent)" />
</Target>
</Project>