-
Notifications
You must be signed in to change notification settings - Fork 253
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
make it possible to cross-compile for iOS and Android targets #285
make it possible to cross-compile for iOS and Android targets #285
Conversation
Cool, LGTM, @overvenus PTAL |
@eranrund Seems you need to run |
// We don't need to generate install targets. | ||
config.define("gRPC_INSTALL", "false"); | ||
// We don't need to build csharp target. | ||
config.define("gRPC_BUILD_CSHARP_EXT", "false"); | ||
// We don't need to build codegen target. | ||
config.define("gRPC_BUILD_CODEGEN", "false"); | ||
// We don't need to build benchmarks. | ||
config.define("gRPC_BENCHMARK_PROVIDER", "none"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this improve build times as well? 😍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does result in less unnecessary code being built :)
Done! |
Restarted Travis failed build. |
Thanks for merging! Any idea when we could expect this in a release? |
What do you think @BusyJay? |
@overvenus Maybe we can schedule a release next week. Several bugs are fixed since 0.4.2. |
That would be awesome ^_^ |
Sweet. Thank you all for moving quickly! |
Heya,
This PR makes it possible to cross-compile this crate to Android and iOS, both simulator and real hardware. I have tested it and the resulting code works flawlessly (tested on iPhone 7, iPhone XS, Nexus6P, iPhone simulator and Android simulator).
Building for iOS is as simple as cargo build --target i386-apple-ios/x86_64-apple-ios/armv7-apple-ios armv7s-apple-ios/aarch64-apple-ios
Android is more complicated and requires a bunch of environment variables. For example, on my machine, this is what I used for aarch64-linux-android: