Repository navigation
Improve compilation efficiency and caching - #11
Conversation
Optimize the release profile (thin LTO, codegen-units=16, opt-level=s), add Gradle up-to-date checks so Rust rebuilds are skipped when sources haven't changed, enable parallel ABI builds, share CI cache across jobs, and add an Android cross-compilation smoke test.
Summary of ChangesHello @pawelchcki, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the build process for the project, particularly for Rust and Android components. It focuses on reducing compilation times and improving caching mechanisms, leading to faster development cycles and more efficient CI/CD pipelines. These changes aim to provide a smoother and quicker build experience for developers and continuous integration systems. Highlights
Changelog
Ignored Files
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces several significant improvements to the build process, focusing on compilation speed and caching. The changes to the release profile in Cargo.toml are well-reasoned and should provide a good balance between build time and binary size. Enabling parallel builds in Gradle and adding input/output declarations for the Rust tasks are excellent steps towards faster and more reliable builds. I've found one issue with the Gradle input declarations that could lead to incorrect caching behavior. Otherwise, the changes are solid and align well with the stated goals.
…prove_compilation_and_caching # Conflicts: # .github/workflows/ci.yml # Cargo.toml # flutter_razemify/android/build.gradle # flutter_razemify/rust/Cargo.toml # razemify-core/src/flutter_ffi.rs
|
/gemini review |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b98fd7811d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
opt-level=z, fat LTO,codegen-units=1) to a balanced configuration (opt-level=s, thin LTO,codegen-units=16,panic=abort) — expected ~3-5x faster release builds per target with minimal size increaseinputs/outputson Rust build tasks so Gradle skips recompilation when only Dart code changedorg.gradle.parallel=trueso the 4 Android ABIs build concurrently instead of sequentiallyRUSTC_WRAPPER=sccachefor cross-target compilation caching (not hardcoded in config to avoid breaking builds without sccache installed)flutter_ffi.rsto eliminate release build warningTest plan
cargo clippy --all-targets --workspace -- -D warningspasses with zero warningscargo build --workspace --releasecompletes with zero warningscargo check -p razemify-wasm --target wasm32-unknown-unknowncompiles cleanlyflutter build apktwice — second run should show Rust tasks as UP-TO-DATE.sofile sizes are acceptable (expected ~5-10% larger than before)