# \[Pitch\] A Vision for WebAssembly Support in Swift

**URL:** <https://forums.swift.org/t/pitch-a-vision-for-webassembly-support-in-swift/79060>\
**Category:** Pitches\
**Tags:** webassembly, wasi\
**Created:** [April 3, 2025, 11:56am UTC](https://forums.swift.org/t/pitch-a-vision-for-webassembly-support-in-swift/79060 "2025-04-03T11:56:25Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![Max\_Desiatov](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/max_desiatov/32/20654_2.png) [@Max\_Desiatov](https://forums.swift.org/u/Max_Desiatov)\
**Post date:** [April 3, 2025, 3:21pm UTC](https://forums.swift.org/t/pitch-a-vision-for-webassembly-support-in-swift/79060/11 "2025-04-03T15:21:13Z")

</div>

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](https://forums.swift.org/t/pitch-sdk-conditional-code/52642/4)

---

_[View the full topic](https://forums.swift.org/t/pitch-a-vision-for-webassembly-support-in-swift/79060)._
