Skip to content

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

Closed

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

Activity

  1. added
    api-suggestion
    arch-wasm
    on Nov 15, 2022
  2. added this to the 8.0.0 milestone on Nov 15, 2022
  3. self-assigned this
    on Nov 15, 2022
  4. teo-tsirpanis commented on Nov 15, 2022

    @teo-tsirpanis
    Contributor

    Is this ready for review? And it should be IsWasi; according to the guidelines acronyms are not capitalized.

  5. changed the title [-][API Proposal]: `OperatingSystem.IsWASI()`[/-] [+][API Proposal]: `OperatingSystem.IsWasi()`[/+] on Nov 15, 2022
  6. pavelsavara commented on Nov 15, 2022

    @pavelsavara
    MemberAuthor

    Is this ready for review? And it should be IsWasi; according to the guidelines acronyms are not capitalized.

    Okay, changed to IsWasi. It's ready.

  7. added
    api-ready-for-review
    and removed
    api-suggestion
    on Nov 15, 2022
  8. added
    os-wasi
    on Feb 28, 2023
  9. bartonjs commented on Feb 28, 2023

    @bartonjs
    Member

    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();
    }
  10. added
    api-approved
    and removed
    api-ready-for-review
    on Feb 28, 2023
  11. added a commit that references this issue on Mar 1, 2023
  12. ghost added
    in-pr
    on Mar 1, 2023
  13. ghost removed
    in-pr
    on Mar 1, 2023
  14. ghost locked as resolved and limited conversation to collaborators on Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api-approvedarch-wasmarea-System.Runtimeos-wasi

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions