Question about vmlib vs iwasm for iOS
For context, I'm working on an integration between Wasmer and Holochain. That's working and has been for a while, but we've tried to integrate with Wasmer's recent option to support the wasm-micro-runtime.
For Linux, MacOS and Android, this seems to work nicely for us. The main reason we were working on this integration though was in the hope that we could use the wasm-micro-runtime on iOS where we can't compile WASMs at startup due to restrictions set by the platform.
I see that on most platforms a vmlib is built, for Android, Linux and MacOS. That is the library that the Wasmer integration expects to be able to link to.
But for iOS only the iwasm.dylib is built. As you'd expect, that then leads to a linker error about the vmlib not being found. What I'm wondering is why that library is not available?
Does the iwasm.dylib serve the same purpose as the vmlib and the build script in the integration just needs to have a special case for iOS? Perhaps there is no vmlib for iOS because it wouldn't work there? Or maybe it's just the case that it hasn't been requested by anybody yet so that's why it's not there? I don't know enough to figure that out I'm afraid!
Hi, from your code, it seems that product-mini/platforms/xxx is used for building? So basically, you can't build iwasm for product-mini/platforms/ios, right?
Hi!
From what I could tell building on my MacOS machine and targeting iOS, the iwasm is produced. What's missing, that I was expected to be present, is the vmlib.
On all the other platforms there's a vmlib but it seems that the build for iOS doesn't intend to create one.
Registering my ongoing interest in this issue
I've tried reaching out in Zulip but I'm no longer monitoring that due to a lack of response there either.
Hi, @ThetaSinner, I have no experience or environment in the iOS platform, but I know that @vickiegpt has used WAMR on iOS device. Maybe you can email him to discuss the issue you encountered
You can refer to the script here https://github.com/Multi-V-VM/Codify/blob/main/wasmer-ios/build_xcframework.sh and there's some porting code for swift.
Thank you both for your responses! So I'm understanding from this that iOS isn't a fully supported platform right now for building it the way I'm expecting, but that there's not a restriction on building for that platform using this script as an example.
Let me see what I can do with this and see whether my organization would consider contributing a build script to this repository.