3 ms·
Why not just compile the Swift to native Android and iOS code?
by gok 7y ago
Why not just compile the Swift to native Android and iOS code?
- GreaterFool 7y agoBecause Wasm could be used mobile as a native first class citizen, not limited to running within a browser or some browser view. And then Wasm code can be shared between multiple environments including mobile, browser, edge (CloudFlare workers), backend (multiple Wasm runtimes are emerging right now and some of then are very performant). And then one would not be limited to Swift but could use any language that compiles to Wasm. So code reuse would effectively skyrocket. Wasm can be used in every corner of computing spectrum. It doesn't mean it's some perfect tool to solve all problems but it can lead to interesting places and those are worth exploring.
- millstone 7y agoHonestly this reads like a solution in search of a problem. Native code will be faster in every way. Wasm's strengths are in running untrusted code - its sandbox is quite strict. So the use case for wasm on mobile is downloading code dynamically. Wasm's competition in this space is JS, not native code.
- jamil7 7y ago> Native code will be faster in every way. Sure, but I believe a lot of people will be willing to make a performance tradeoff for that convinience.
- jamil7 7y agoNot sure about the OP but personally I use WKWebView in a few places to render some HTML from a server for parts of my app that a user can then interact which needs to run some JS. For me it could mean being able to keep more of my app in a single language and port peices of it to other platforms.