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

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

Closed
Tracked by #79053
pavelsavara opened this issue Nov 15, 2022 · 5 comments · Fixed by #82817
Closed
Tracked by #79053

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

pavelsavara opened this issue Nov 15, 2022 · 5 comments · Fixed by #82817
Assignees
Labels
api-approved API was approved in API review, it can be implemented arch-wasm WebAssembly architecture area-System.Runtime os-wasi Related to WASI variant of arch-wasm
Milestone

Comments

@pavelsavara
Copy link
Member

pavelsavara commented Nov 15, 2022

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

@pavelsavara pavelsavara added api-suggestion Early API idea and discussion, it is NOT ready for implementation arch-wasm WebAssembly architecture area-Build-mono labels Nov 15, 2022
@pavelsavara pavelsavara added this to the 8.0.0 milestone Nov 15, 2022
@ghost
Copy link

ghost commented Nov 15, 2022

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

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 we prefer all upper case. Alternatively we could have:

public static bool IsWasi();

Risks

No response

Author: pavelsavara
Assignees: -
Labels:

api-suggestion, arch-wasm, area-Build-mono

Milestone: 8.0.0

@ghost
Copy link

ghost commented Nov 15, 2022

Tagging subscribers to this area: @dotnet/area-system-runtime
See info in area-owners.md if you want to be subscribed.

Issue Details

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 we prefer all upper case. Alternatively we could have:

public static bool IsWasi();

Risks

No response

Author: pavelsavara
Assignees: -
Labels:

api-suggestion, arch-wasm, area-System.Runtime

Milestone: 8.0.0

@pavelsavara pavelsavara self-assigned this Nov 15, 2022
@teo-tsirpanis
Copy link
Contributor

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

@pavelsavara pavelsavara changed the title [API Proposal]: OperatingSystem.IsWASI() [API Proposal]: OperatingSystem.IsWasi() Nov 15, 2022
@pavelsavara
Copy link
Member Author

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.

@teo-tsirpanis teo-tsirpanis added api-ready-for-review API is ready for review, it is NOT ready for implementation and removed api-suggestion Early API idea and discussion, it is NOT ready for implementation labels Nov 15, 2022
@teo-tsirpanis teo-tsirpanis added the os-wasi Related to WASI variant of arch-wasm label Feb 28, 2023
@bartonjs
Copy link
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();
}

@bartonjs bartonjs added api-approved API was approved in API review, it can be implemented and removed api-ready-for-review API is ready for review, it is NOT ready for implementation labels Feb 28, 2023
pavelsavara added a commit to pavelsavara/runtime that referenced this issue Mar 1, 2023
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Mar 1, 2023
pavelsavara added a commit that referenced this issue Mar 1, 2023
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Mar 1, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Mar 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api-approved API was approved in API review, it can be implemented arch-wasm WebAssembly architecture area-System.Runtime os-wasi Related to WASI variant of arch-wasm
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants