Unexpected overhead on x64 Linux
There is a project I have tried called Conty https://github.com/Kron4ek/Conty/releases It provides a custom Linux container as a single executable file. They have a variant specifically for running Wine, and on my system it is much more performant than Boxedwine.
I noticed the following statement in Conty's README which may be of some relevance If you plan to run 32-bit applications, your kernel must be compiled with CONFIG_IA32_EMULATION and CONFIG_COMPAT_32BIT_TIME options enabled
@narinishi Thanks for the link. I definitely enjoy seeing how other people solve the same problem as Boxedwine.
I would say that Boxedwine can run on a x64 Linux system and do alright, but its not the main target just because that system can run Wine itself. And if you want to do it in a container, like Conty, you can do that too. There is no emulation happening. CONFIG_IA32_EMULATION allows syscalls (kernel calls from the app) to be mapped from 32-bit to 64-bit. For some reason the 64-bit kernel has a different numbering table for what number each syscall uses. So its not really emulation as much as a mapping.
On Linux, Wine uses shared memory and unix sockets (almost like pipes but can pass file handles too). Other platforms can't do this so a lot of Boxedwine's emulation is around that. So when Boxedwine is running on Linux, its emulating a lot of things it really doesn't need too. If I didn't have to emulate those things and maybe just emulated the CPU for Arm on Arm Linux system, then I would probably end up with a project more like https://github.com/AndreRH/hangover which is pretty cool.
The Linux image used by Boxedwine is much smaller than Conty. Is there anything missing from it that would prevent it being ran standalone?
@narinishi It doesn't contain the kernel, drivers or x11. It's probably smaller because it uses Tiny Core Linux. Even with all those things I removed added back, it can stay pretty small which is why I used it.
Okay. None of those would be necessary for running on top of an existing Linux. But it seems POSIX permissions aren't preserved in the zip file, which would make it difficult to run under chroot.
@narinishi Correct, normal Linux could not run these file systems. I also handle symbolic links differently.