Skip to content

[API Proposal]: OperatingSystem.IsWasi() #78389

Closed
@pavelsavara

Description

@pavelsavara

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

if (OperatingSystem.IsWasi())
{
    throw new PlatformNotSupportedException();
}

Alternative Designs

WASI is abreviation so it could be all upper case.

public static bool IsWASI();

Risks

No response

Metadata

Metadata

Assignees

Labels

api-approvedAPI was approved in API review, it can be implementedarch-wasmWebAssembly architecturearea-System.Runtimeos-wasiRelated to WASI variant of arch-wasm

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions