-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Have to make clean everytime I change rust code #21
Comments
that's really weird behavior, what version of cargo make do you use? could you please try with a clean local clone and try running I see in these error messages a warning about
Could you try with a clean clone and for example try only one target? |
Hi @shekohex, You brought up a good point that maybe one of my build dependencies was out of date. I was using cargo-ndk 1.0. I upgraded it to that latest version, and upgraded to the most recent
Reguardless, I wanted to do what you recommended me to try. When I do a fresh
Finally, it appears that cargo automatically selects the appropriate lib type, so, there may be no need for having
) |
That's a progress, I guess you will also need to update cargo-lipo version too. and besides these warnings, the script that restore the crate type is used to make/force android side to only compile a shared library, not a static one. and the other way around in iOS, since in Android or at least in flutter, we really don't need the static library, so that cuts the compile time for Android a lot! |
It appears the trick is just to selectively compile targets instead of just running For the record, |
oh, you on the new apple m1 chips, okay feel free to keep this open, and it would be very helpful if you got time to write this up, so it could help others. (also feel free to open a PR to the README, I'll Happily accept and merge them). Thanks! |
Hey. did you figure out how to resolve the issue with lipo and Mac ARM CPU ? |
Unfortunately, in order to compile the rust program using
cargo make
, I must first runcargo make clean
. This, of course, adds a long compile-time overhead. This is the error message I get when trying tocargo make
without cleaning first:Additionally, between every compile, I need to manually change the cargo.toml. Before compile,
crate-type
must have bothcdylib
andstaticlib
in order to compile:After running
cargo make
, it gets changed to:If I forget to change the crate-type back to including
cdylib
, then compiling failsNote, as long as I complete the workarounds, the program compiles fine. It's just that there's additional compile-time overhead in having to clean the workspace and resetting the cargo.toml manually each time
The text was updated successfully, but these errors were encountered: