TIL: Swift has a vision for targeting embedded platforms https://forums.swift.org/t/accepted-a-vision-for-embedded-swift/68067
It's not mentioned at all in the doc, but work in this area would make a _huge_ difference for the viability of Swift targeting Wasm.
@asb
Interesting. I assume it’s the “allocating” variety of embedded Swift you’re thinking of, ie classes still supported and there’s still a heap?
Is it the sheer download size of the type metadata necessary for erasure, existentials, etc that’s the barrier with current Swift?
@inthehands the doc notes that the Swift runtime and stdlib is 5MB right now - so the work mentioned to produce smaller more minimal binaries would help a lot. You're right that avoiding heap allocation doesn't seem at all necessary in the wasm context.
@asb
Got it. I’m wondering whether binary size is the main thing you were thinking of, or is there other stuff too?
@inthehands yes primarily binary size
@asb
Thanks! Wondering about size-reducing measures that would preserve existentials, although probably doesn’t go anywhere. Will post in the forum.