OSX rust setup items to check if you are having trouble building the default project #2319
bobwith2bees
started this conversation in
General
Replies: 1 comment
-
Looks great and thanks for sharing! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Just capturing two gotcha's I encountered. Coming from the Flutter/Dart camp, I had only played with Rust a few times before on my OSX Box. Of course that's what got me into trouble, so passing on my lessons learned.
Why? - I was having errors that the crates for stdlib were missing.
rustup target add
didn't seem to install them with my brew managed setup. I hit some articles that had strong opinions that cross compile project like flutter_rust_bridge should avoid brew managed rust. Could also be related to #2...rustup show active-toolchain
matches your hardware platformuname -m
. OSX on an arm64 can run the x86 version of the build tools. I corrected this withrustup default stable-aarch64-apple-darwin
on my M2 (arm64) machine.Why? - I found the script rust_builder/cargokit/run_build_tool.sh would error out when I had a mismatch when creating the build tools on the fly. It was confusing since I was building for mobile and I was getting an error related to darwin. It took me a while to notice the x86 toolchain was active, and then I realized what might be the problem.
Hope this helps.
Beta Was this translation helpful? Give feedback.
All reactions