Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal to add WasmImportAttribute to control wasm module names #93823

Merged
merged 6 commits into from
Nov 9, 2023
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
Expand Up @@ -1016,6 +1016,7 @@
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\UnmanagedType.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\VarEnum.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\VariantWrapper.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\WasmImportLinkageAttribute.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\ISimdVector_2.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\Scalar.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Intrinsics\SimdVectorExtensions.cs" />
Expand Down Expand Up @@ -2721,4 +2722,4 @@
<Compile Include="$(MSBuildThisFileDirectory)System\Numerics\IUnaryPlusOperators.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Numerics\IUnsignedNumber.cs" />
</ItemGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace System.Runtime.InteropServices
{
/// <summary>
/// Specifies that the P/Invoke marked with this attribute should be linked in as a WASM import.
/// </summary>
AaronRobinsonMSFT marked this conversation as resolved.
Show resolved Hide resolved
AaronRobinsonMSFT marked this conversation as resolved.
Show resolved Hide resolved
/// <remarks>
/// See https://webassembly.github.io/spec/core/syntax/modules.html#imports.
/// </remarks>
[AttributeUsage(AttributeTargets.Method, Inherited = false)]
public sealed class WasmImportLinkageAttribute : Attribute
{
/// <summary>
/// Instance constructor.
/// </summary>
public WasmImportLinkageAttribute() { }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1711,6 +1711,11 @@ public sealed partial class VariantWrapper
public VariantWrapper(object? obj) { }
public object? WrappedObject { get { throw null; } }
}
[System.AttributeUsageAttribute(System.AttributeTargets.Method, Inherited = false)]
public sealed class WasmImportLinkageAttribute : Attribute
{
public WasmImportLinkageAttribute() { }
}
}
namespace System.Runtime.InteropServices.ComTypes
{
Expand Down
Loading