-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[API Proposal]: OperatingSystem.IsWasi()
#78389
Comments
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsBackground and motivationAdding new RID for compiling Mono to WebAssembly System Interface platform. Related discussion #77780 and #78376 API Proposalnamespace System;
public sealed class OperatingSystem : ISerializable, ICloneable
{
+ public static bool IsWASI();
} API Usageif (OperatingSystem.IsWASI())
{
throw new PlatformNotSupportedException();
} Alternative DesignsWASI is abreviation so we prefer all upper case. Alternatively we could have:
RisksNo response
|
Tagging subscribers to this area: @dotnet/area-system-runtime Issue DetailsBackground and motivationAdding new RID for compiling Mono to WebAssembly System Interface platform. Related discussion #77780 and #78376 API Proposalnamespace System;
public sealed class OperatingSystem : ISerializable, ICloneable
{
+ public static bool IsWASI();
} API Usageif (OperatingSystem.IsWASI())
{
throw new PlatformNotSupportedException();
} Alternative DesignsWASI is abreviation so we prefer all upper case. Alternatively we could have:
RisksNo response
|
Is this ready for review? And it should be |
OperatingSystem.IsWASI()
OperatingSystem.IsWasi()
Okay, changed to |
Looks good as proposed. Most of the other OperatingSystem.Is* methods have a -VersionAtLeast variant (with varying numbers of accepted integers), consider if WASI needs one (in the future). namespace System;
public sealed partial class OperatingSystem : ISerializable, ICloneable
{
public static bool IsWasi();
} |
Background and motivation
Adding new RID for compiling Mono to WebAssembly System Interface platform.
Related discussion #77780 and #78376
API Proposal
namespace System; public sealed class OperatingSystem : ISerializable, ICloneable { + public static bool IsWasi(); }
API Usage
Alternative Designs
WASI is abreviation so it could be all upper case.
Risks
No response
The text was updated successfully, but these errors were encountered: