Closed paul-marechal closed 3 years ago
This is in answer to https://github.com/godot-rust/godot-rust-template/pull/40#issuecomment-813756454 where I mentioned making make run
work based on the current running OS.
I honestly don't know what to think. On one hand it should work, but on the other hand I'm not especially fan of the implementation. If that's what it takes to have it cross-platform then so be it, but if anyone has a better idea I'll gladly listen.
Yes, I agree that this does seem a bit fragile. In case any new cfg entries are added, the hard-coded indices can break. What do you think about adding a build-dynamic
target that invokes cargo
without a --target
flag, with the mv
command adjusted accordingly, and use that in run
instead?
that invokes
cargo
without a--target
flag, with themv
command adjusted accordingly, and use that inrun
instead?
This will output the shared libraries into target/default
, but I couldn't find where to move those files so that Godot would know it has to use those given the current platform?
Closing because with hindsight I realize how fragile this is. Thanks for the comment.
Rust seem to make querying the default target painful, but it is possible using
rustc --print cfg
and some processing.