How to cross compile from Mac to Linux?

Hi, I regularly compile Logseq for Mac. Now I would like to compile for Linux, but my Linux machine is much too slow. How can I cross compile to Linux from my Mac? Is it possible, is it too much trouble?