Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

thebart

macrumors 6502
Original poster
Feb 19, 2023
498
506
I need to cross compile an app using a Linux toolchain. On windows, i use WSL for this and it works great. Build time is much shorter than running a full VM. WSL may be the coolest thing Microsoft is doing with Windows.

Is there something like this for Mac? I'll be using an M1 mini.

Thanks
 

thebart

macrumors 6502
Original poster
Feb 19, 2023
498
506
That looks interesting. Thanks, I'll check it out

Have you tried running AS on it? How's the performance on it?

(My Mac has not arrived yet. I'm over excited)

Thing i like about WSL is it's dead simple. You just open terminal and start a Ubuntu shell like you would a Windows shell. It opens instantly and most things just work. You can read and write directly to host filesystem. Performance seems like 80%+ to bare metal. Minimal mem footprint. It's as if it has Ubuntu built in
 

maplepants

macrumors newbie
Aug 3, 2021
8
3
Don't know what you mean by AS. But multipass is dead simple. With a single command you can stand up a brand new VM that's ready to go.

If you're into Ubuntu's Cloud init, or ansible it's really easy to build out templates. You can even do with bash scripts.

For example, I have some scripts ready to go stand up a new nginx reverse proxy, DNS server, or a few other things I need.

I also use the "primary" VM as just a nice way to have Linux directly on my Mac. It's all super slick and has a lot of advantages that I actually prefer over WSL (such as multiple instances being so much easier).
 
  • Like
Reactions: thebart

thebart

macrumors 6502
Original poster
Feb 19, 2023
498
506
Sorry, i meant are you using it on Apple Silicon? M1/M2
 

maplepants

macrumors newbie
Aug 3, 2021
8
3
Depending on your app and development methods, you may not need anything like WSL. macOS and Linux are both Unix-like operating systems. Many Unix and Linux tools run on macOS.
That’s a good point.

Python on Windows has many differences to Linux python. If you’re writing Python code that’ll run on a Linux server you can’t really write and test it on Windows.

On macOS the differences are much smaller. I have written many scripts on native macOS Python that go on to run on a Linux server flawlessly.

Having a true Unix OS brings a lot of benefits.
 

thebart

macrumors 6502
Original poster
Feb 19, 2023
498
506
That’s a good point.

Python on Windows has many differences to Linux python. If you’re writing Python code that’ll run on a Linux server you can’t really write and test it on Windows.

On macOS the differences are much smaller. I have written many scripts on native macOS Python that go on to run on a Linux server flawlessly.

Having a true Unix OS brings a lot of benefits.
It took a lot of googling, downloading, testing for two days but I managed to get the toolchain I needed to build (on bare metal) for one of the platforms I'm interested in. The other appears hopeless because everything i dug up was just people asking if anyone has figured out how to do it because they're stuck :) I'll probably end up going the VM or hopefully VM-lite route. Mac and Linux share a lineage but they can't quite interbreed :)
 

s1mn

macrumors newbie
Nov 12, 2020
2
1
I'm a bit late to the party, but... OrbStack does this. It provides a better alternative to Docker Desktop too, and a simple, Mac-native UI (as well as comprehensive CLI tools). Can't recommend it highly enough.
 

schnaps

macrumors newbie
Jan 25, 2024
12
3
Homebrew - allows to run native almost anything Linux software.
WSL type crutches are definitely not needed for cross compile.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.