crank icon indicating copy to clipboard operation
crank copied to clipboard

Better support for cross-compilation when neccesary

Open Clockwork757 opened this issue 2 years ago • 1 comments

Crank doesn't recognize when cargo compiles to a target that doesn't match the host system. This is necessary on arm64 windows since the playdate simulator is only built for amd64 on windows.

My workaround is to build with cargo, copy the files to the default debug/release target and then execute crank run. For example:

cargo build --target x86_64-pc-windows-msvc
cp -fo .\target\x86_64-pc-windows-msvc\debug\* .\target\debug\
crank run

This works but it would be nice for crank to just work. I would also be down to implement this but I've had some trouble finding a simple way to determine the output folder or all the sources we'd need to check to determine it. Any guidance on that and I think this would be a pretty simple patch.

Clockwork757 avatar Dec 24 '23 17:12 Clockwork757

I've did it in other project cargo-playdate. I agree that there's no simple way to determine rustc-target, as well as cargo-target, so I'm using underlying cargo there.

boozook avatar Apr 15 '24 16:04 boozook