Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
run: |
ls ./artifacts/*.nupkg
version=$(unzip -p ./artifacts/*SDK*.nupkg '*.nuspec' | grep -oE "<version>[^<]+" | sed 's/<version>//' | grep -oE "^[0-9]+\.[0-9]+\.[0-9]+-preview")
template_version=$(grep -oE "Version=\"[^\"]+" ./templates/content/wasi-cli/wasi-cli.csproj | sed 's/Version="//' | grep -oE "^[0-9]+\.[0-9]+\.[0-9]+-preview")
template_version=$(grep 'Componentize.DotNet.Wasm.SDK' ./templates/content/wasi-cli/wasi-cli.csproj | grep -oE 'Version="[0-9]+\.[0-9]+\.[0-9]+-preview' | sed 's/Version="//')
echo "Package Version: $version | Template version: $template_version"
if [ "$version" != "$template_version" ]; then
echo "Version mismatch: Package version ($version) does not match template version ($template_version)";
Expand Down
15 changes: 10 additions & 5 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,18 @@
<NoWarn>$(NoWarn);NU1507</NoWarn>

<!-- tool versions -->
<WasmToolsVersion>1.227.1</WasmToolsVersion>
<WacVersion>v0.6.1</WacVersion>
<PrebuiltWitBindgenVersion>0.41.0</PrebuiltWitBindgenVersion>
<PrebuildWkgVersion>0.10.0</PrebuildWkgVersion>
<!-- https://github.com/bytecodealliance/wasm-tools/releases -->
<WasmToolsVersion>1.239.0</WasmToolsVersion>
<!-- https://github.com/bytecodealliance/wac/releases -->
<WacVersion>v0.8.0</WacVersion>
<!-- https://github.com/bytecodealliance/wit-bindgen/releases -->
<PrebuiltWitBindgenVersion>0.46.0</PrebuiltWitBindgenVersion>
<!-- https://github.com/bytecodealliance/wasm-pkg-tools/releases -->
<PrebuildWkgVersion>0.12.0</PrebuildWkgVersion>

<!-- test artifacts -->
<WasmtimeVersion>30.0.2</WasmtimeVersion>
<!-- https://github.com/bytecodealliance/wasmtime/releases -->
<WasmtimeVersion>36.0.2</WasmtimeVersion>

</PropertyGroup>
</Project>
6 changes: 4 additions & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
</PropertyGroup>
<ItemGroup>
<!-- find latest versions at https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet-experimental by name of package -->
<PackageVersion Include="Microsoft.DotNet.ILCompiler.LLVM" Version="10.0.0-alpha.1.25162.1" />
<PackageVersion Include="runtime.$(NETCoreSdkPortableRuntimeIdentifier).Microsoft.DotNet.ILCompiler.LLVM" Version="10.0.0-alpha.1.25162.1" />
<!-- https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet-experimental/NuGet/Microsoft.DotNet.ILCompiler.LLVM/versions -->
<PackageVersion Include="Microsoft.DotNet.ILCompiler.LLVM" Version="10.0.0-preview.2.25455.1" />
<!-- https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet-experimental/NuGet/runtime.wasi-wasm.Microsoft.DotNet.ILCompiler.LLVM/versions -->
<PackageVersion Include="runtime.$(NETCoreSdkPortableRuntimeIdentifier).Microsoft.DotNet.ILCompiler.LLVM" Version="10.0.0-preview.2.25455.1" />

<!-- Tests -->
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="[17.12.0,)" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
<WitBindgenRuntime>native-aot</WitBindgenRuntime>

<!-- Keep this block all in sync manually, since URLs can be arbitrary -->
<WasiSdkVersion Condition="'$(WasiSdkVersion)' == ''">24.0</WasiSdkVersion>
<!-- https://github.com/WebAssembly/wasi-sdk/releases -->
<WasiSdkVersion Condition="'$(WasiSdkVersion)' == ''">27.0</WasiSdkVersion>
<WasiSdkUrl Condition="$([MSBuild]::IsOSPlatform('Windows'))">https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$(WasiSdkVersion.Split(".")[0])/wasi-sdk-$(WasiSdkVersion)-x86_64-windows.tar.gz</WasiSdkUrl>
<WasiSdkUrl Condition="$([MSBuild]::IsOSPlatform('Linux'))">https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$(WasiSdkVersion.Split(".")[0])/wasi-sdk-$(WasiSdkVersion)-x86_64-linux.tar.gz</WasiSdkUrl>
<WasiSdkUrl Condition="$([MSBuild]::IsOSPlatform('OSX'))">https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$(WasiSdkVersion.Split(".")[0])/wasi-sdk-$(WasiSdkVersion)-x86_64-macos.tar.gz</WasiSdkUrl>
Expand All @@ -20,7 +21,7 @@
MSBuild stuff to acquire the necessary SDKs (WASI SDK) automatically. It will take a few mins on the
first build on a given machine, but after that should no-op.
-->
<Target Name="PrepareWasmSdks" BeforeTargets="CheckWasmSdks" DependsOnTargets="ObtainWasiSdk">
<Target Name="PrepareWasmSdks" BeforeTargets="IlcCompile" DependsOnTargets="ObtainWasiSdk">
<PropertyGroup>
<WASI_SDK_PATH>$(WasiSdkRoot)</WASI_SDK_PATH>
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions templates/content/wasi-cli/wasi-cli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<ItemGroup>
<PackageReference Include="BytecodeAlliance.Componentize.DotNet.Wasm.SDK" Version="0.7.0-preview*" />
<PackageReference Condition="'$(platform)' == 'Windows_NT'" Include="runtime.win-x64.microsoft.dotnet.ilcompiler.llvm" Version="10.0.0-alpha.1.25162.1" />
<PackageReference Condition="'$(platform)' == 'linux'" Include="runtime.linux-x64.microsoft.dotnet.ilcompiler.llvm" Version="10.0.0-alpha.1.25162.1" />
<PackageReference Condition="'$(platform)' == 'Windows_NT'" Include="runtime.win-x64.microsoft.dotnet.ilcompiler.llvm" Version="10.0.0-preview.2.25455.1" />
<PackageReference Condition="'$(platform)' == 'linux'" Include="runtime.linux-x64.microsoft.dotnet.ilcompiler.llvm" Version="10.0.0-preview.2.25455.1" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion test/E2ETest/testapps/E2EConsumer/E2EConsumer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<ItemGroup>
<PackageReference Include="BytecodeAlliance.Componentize.DotNet.Wasm.SDK" Version="$(PackageVersion)" />
<PackageReference Include="runtime.$(NETCoreSdkPortableRuntimeIdentifier).Microsoft.DotNet.ILCompiler.LLVM" Version="10.0.0-alpha.1.25118.1"/>
<PackageReference Include="runtime.$(NETCoreSdkPortableRuntimeIdentifier).Microsoft.DotNet.ILCompiler.LLVM" Version="10.0.0-preview.2.25455.1"/>

<!-- Just to ensure build order -->
<ProjectReference Include="..\E2EProducer\E2EProducer.csproj" ReferenceOutputAssembly="false" />
Expand Down
2 changes: 1 addition & 1 deletion test/E2ETest/testapps/E2EProducer/E2EProducer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<ItemGroup>
<PackageReference Include="BytecodeAlliance.Componentize.DotNet.Wasm.SDK" Version="$(PackageVersion)" />
<PackageReference Include="runtime.$(NETCoreSdkPortableRuntimeIdentifier).Microsoft.DotNet.ILCompiler.LLVM" Version="10.0.0-alpha.1.25118.1"/>
<PackageReference Include="runtime.$(NETCoreSdkPortableRuntimeIdentifier).Microsoft.DotNet.ILCompiler.LLVM" Version="10.0.0-preview.2.25455.1"/>
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<!-- After build, create the composed component so it can be executed in the test -->
<Target Name="ComposeWasmComponent" AfterTargets="Publish">
<PropertyGroup>
<DependencyComponent>../SimpleProducer/bin/$(Configuration)/$(TargetFramework)/wasi-wasm/native/simpleproducer.wasm</DependencyComponent>
<DependencyComponent>../SimpleProducer/bin/$(Configuration)/$(TargetFramework)/wasi-wasm/publish/simpleproducer.wasm</DependencyComponent>
</PropertyGroup>

<MakeDir Directories="dist" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Generated by `wit-bindgen` 0.40.0. DO NOT EDIT!
// Generated by `wit-bindgen` 0.46.0. DO NOT EDIT!
// <auto-generated />
#nullable enable
using System.Runtime.InteropServices;

namespace MySimpleWorld {

public interface IMySimpleWorld {
Expand All @@ -11,7 +11,7 @@ public interface IMySimpleWorld {

public readonly struct None {}

[StructLayout(LayoutKind.Sequential)]
[global::System.Runtime.InteropServices.StructLayoutAttribute(global::System.Runtime.InteropServices.LayoutKind.Sequential)]
public readonly struct Result<TOk, TErr>
{
public readonly byte Tag;
Expand Down Expand Up @@ -45,7 +45,7 @@ public TOk AsOk
return (TOk)value;
}

throw new ArgumentException("expected k, got " + Tag);
throw new global::System.ArgumentException("expected k, got " + Tag);
}
}

Expand All @@ -58,7 +58,7 @@ public TErr AsErr
return (TErr)value;
}

throw new ArgumentException("expected Err, got " + Tag);
throw new global::System.ArgumentException("expected Err, got " + Tag);
}
}

Expand All @@ -70,11 +70,10 @@ public class Tags
}

namespace exports {
using System.Runtime.InteropServices;
public static class MySimpleWorld
{

[UnmanagedCallersOnly(EntryPoint = "get-number")]
[global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(EntryPoint = "get-number")]
public static unsafe int wasmExportGetNumber() {

int ret;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Generated by `wit-bindgen` 0.40.0. DO NOT EDIT!
// Generated by `wit-bindgen` 0.46.0. DO NOT EDIT!
// <auto-generated />
#nullable enable

#if !NET9_0_OR_GREATER
// temporarily add this attribute until it is available in dotnet 9
namespace System.Runtime.InteropServices
{
internal partial class WasmImportLinkageAttribute : Attribute {}
internal partial class WasmImportLinkageAttribute : global::System.Attribute {}
}
#endif
Loading