3 ms·
Could you, in turn, convert this to Wasm? (I'm wondering if it's possible to convert a macOS command-line tool to run on x86-64.)
by CharlesW 3y ago
Could you, in turn, convert this to Wasm? (I'm wondering if it's possible to convert a macOS command-line tool to run on x86-64.)
- themerone 3y agoUnlikely, you would have to convert every linked library, and every system call would have to be supported by the wasm runtime.
- bloopernova 3y agoNow I'm curious what the macOS CLI binary is!
- saagarjha 3y agoPlacing my bets on codesign
- aleclm 3y agoWe wanted to have a demo on our website where you could upload your binary and run it in the browser recompiling to WASM. Feasible, but not a negligible amount of work. About macOS: we can lift any binary for any platform, but we can recompile to an executable only programs for Linux. The reason for this is that the QEMU user mode only supports running Linux on Linux. It would be, in principle, possible to add support for macOS user mode (there's a half dead FreeBSD user mode), but it's quite some work. Windows would be almost impossible: in Windows, the compatibility layer for user applications (i.e., the boundary where Microsoft tells you that things will stay the same in the future) is not the boundary between the user space and the kernel (as it is in Linux) but the system DLLs. So QEMU should become KERNEL32.dll-aware, which would be weird and very different from the current design of QEMU user mode. This said, if you have a dynamic binary that does not perform any syscall (if not through other dynamic libraries), something can be worked out.
- saagarjha 3y agomacOS has a similar boundary.