Skip to content

build(xtask): respect custom cargo target directories - #881

Open
RandyMcMillan wants to merge 1 commit into
bitcoinppl:masterfrom
RandyMcMillan:1849/967483/816479/aeb883fc/1cc5dbf0-upstream-pr
Open

RandyMcMillan wants to merge 1 commit into
bitcoinppl:masterfrom
RandyMcMillan:1849/967483/816479/aeb883fc/1cc5dbf0-upstream-pr

Conversation

@RandyMcMillan

Copy link
Copy Markdown
Contributor

No description provided.

@coderabbitai

coderabbitai Bot commented Sep 18, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: bitcoinppl/cove/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: a0db8440-770d-4276-8e5c-cdbe314123ae

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Sep 18, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

The PR appears safe to merge; the artifact lookup paths now align with Cargo’s configured target directory without changing profile or target layout.

Summary

This PR updates the Android and iOS xtask build pipelines to discover Cargo’s configured target directory through cargo metadata rather than assuming ./target.

  • Adds a shared metadata parser returning Cargo’s target directory as a PathBuf.
  • Uses that directory when locating Android shared libraries for packaging and Kotlin binding generation.
  • Uses that directory when locating iOS static libraries for Swift binding generation and XCFramework creation.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Config[Cargo environment and config] --> Metadata[cargo metadata]
  Metadata --> TargetDir[target_directory]
  TargetDir --> AndroidPath[Android target / profile / libcove.so]
  TargetDir --> IOSPath[iOS target / profile / libcove.a]
  AndroidPath --> AndroidPackage[jniLibs and Kotlin bindings]
  IOSPath --> IOSPackage[XCFramework and Swift bindings]
Loading

Reviews (1) · Last reviewed commit: "build(xtask): respect custom cargo targe..."

@RandyMcMillan

Copy link
Copy Markdown
Contributor Author

@praveenperera praveenperera left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @RandyMcMillan approved

@praveenperera
praveenperera enabled auto-merge (squash) September 18, 2026 12:38
@praveenperera
praveenperera force-pushed the 1849/967483/816479/aeb883fc/1cc5dbf0-upstream-pr branch from 23235a8 to b1a9618 Compare September 18, 2026 17:55
@praveenperera

Copy link
Copy Markdown
Member

@RandyMcMillan can you please run cargo fmt on the latest rust

@praveenperera
praveenperera force-pushed the 1849/967483/816479/aeb883fc/1cc5dbf0-upstream-pr branch from b1a9618 to d842e71 Compare September 18, 2026 20:27
auto-merge was automatically disabled September 18, 2026 21:10

Head branch was pushed to by a user without write access

@RandyMcMillan
RandyMcMillan force-pushed the 1849/967483/816479/aeb883fc/1cc5dbf0-upstream-pr branch from d842e71 to 21e9a18 Compare September 18, 2026 21:10
Query cargo metadata to obtain the actual target directory instead of
hardcoding ./target/. This fixes builds for users with CARGO_TARGET_DIR
or [build] target-dir set in their cargo config.

chore(apply cargo fmt): rust/xtask/src/common.rs
chore(apply cargo fmt): rust/xtask/src/android.rs
@RandyMcMillan
RandyMcMillan force-pushed the 1849/967483/816479/aeb883fc/1cc5dbf0-upstream-pr branch from 21e9a18 to 9886f4e Compare September 18, 2026 21:14
@RandyMcMillan

RandyMcMillan commented Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

@RandyMcMillan can you please run cargo fmt on the latest rust

done 9886f4e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants