4 ms·
We 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
by aleclm 3y ago
We 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.