I'm sure you can make apt work in a multilib world, but the mainstream way it generally works well is you stick to distro's arm64 packages (pretty comprehensive; arm64 is not some esoteric arch) for the most part and they work just great and you use/build docker containers that might be x86 and that is supported by `--platform` switch once you get basic stuff configured.
I suspect if your use case is more esoteric, it's likely not going to be worth the time. I'd just SSH to a second linux box.
To correct your statement on one key thing: Rosetta2 in this case is not running on host OS. Apple provides a Linux version of Rosetta 2 which runs inside your VM and is registered as a binfmt interpreter for ELF x86 binaries[1]. This is similar to how `wine` or `java` or `mono` can execute their respective binaries directly.
I suspect if your use case is more esoteric, it's likely not going to be worth the time. I'd just SSH to a second linux box.
To correct your statement on one key thing: Rosetta2 in this case is not running on host OS. Apple provides a Linux version of Rosetta 2 which runs inside your VM and is registered as a binfmt interpreter for ELF x86 binaries[1]. This is similar to how `wine` or `java` or `mono` can execute their respective binaries directly.
[1]: https://developer.apple.com/documentation/virtualization/run...