I don't think these availability annotations are currently available anywhere outside Darwin platforms. IMO it should be a part of a separate discussion about making availability annotations in Swift more broadly applicable for any non-Darwin platform, not just Wasm.
WASI
could be a predefined "platform" (as in #if os(WASI)
), but it could make just as much sense as a package or a module. In the latter case, in theory you can use #if canImport(WASI, _version: 0.2)
today already: [Pitch] SDK-conditional code - #4 by allevato