Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project>
<PropertyGroup>
<WitBindgenRuntime>native-aot</WitBindgenRuntime>
<WitBindgenAddtionalArgs></WitBindgenAddtionalArgs>

<!-- Keep this block all in sync manually, since URLs can be arbitrary -->
<WasiSdkVersion>24.0</WasiSdkVersion>
Expand Down
1 change: 1 addition & 0 deletions test/E2ETest/testapps/E2EConsumer/E2EConsumer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<UseAppHost>false</UseAppHost>
<PublishTrimmed>true</PublishTrimmed>
<TargetName>e2econsumer</TargetName>
<WitBindgenAddtionalArgs>--features float-add</WitBindgenAddtionalArgs>
</PropertyGroup>

<ItemGroup>
Expand Down
5 changes: 5 additions & 0 deletions test/E2ETest/testapps/E2EConsumer/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@

var result = OperationsInterop.Add(123, 456);
Console.WriteLine($"123 + 456 = {result}");

// this is just here to make sure we can enable features and pass flags via WitBindgenAddtionalArgs
// the fact that it compiles is enough to test this worked.
var floatResult = OperationsInterop.AddFloat(1.1f, 1.2f);
Console.WriteLine($"1.1 + 1.2 = {floatResult}");
1 change: 1 addition & 0 deletions test/E2ETest/testapps/E2EProducer/E2EProducer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<RuntimeIdentifier>wasi-wasm</RuntimeIdentifier>
<PublishTrimmed>true</PublishTrimmed>
<TargetName>e2eproducer</TargetName>
<WitBindgenAddtionalArgs>--features float-add</WitBindgenAddtionalArgs>
</PropertyGroup>

<ItemGroup>
Expand Down
5 changes: 5 additions & 0 deletions test/E2ETest/testapps/E2EProducer/OperationsImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,9 @@ public static int Add(int left, int right)
{
return left + right;
}

public static float AddFloat(float left, float right)
{
return left + right;
}
}
4 changes: 3 additions & 1 deletion test/E2ETest/testapps/E2EProducer/producer-consumer.wit
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package test:producer-consumer;

interface operations {
add: func(left: s32, right: s32) -> s32;
add: func(left: s32, right: s32) -> s32;
@unstable(feature = float-add)
add-float: func(a: f32, b: f32) -> f32;
}

world producer {
Expand Down