SteveSandersonMS / dotnet-wasi-sdk

Packages for building .NET projects as standalone WASI-compliant modules

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Detecting if running under WASI

andrewmd5 opened this issue · comments

commented

Is there a way to detect if the current platform is WASI? I could pass some sort of environment variable, but it would be nice to have a means built-in.

commented

The answer is var isWasm = RuntimeInformation.OSArchitecture is Architecture.Wasm;