Skip to content

Always go through rustup proxies#8914

Merged
topjohnwu merged 1 commit intomasterfrom
rust
Apr 1, 2025
Merged

Always go through rustup proxies#8914
topjohnwu merged 1 commit intomasterfrom
rust

Conversation

@topjohnwu
Copy link
Copy Markdown
Owner

No description provided.

@yujincheng08 yujincheng08 requested a review from Copilot April 1, 2025 10:28
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR ensures that Rust builds always go through rustup proxies by updating dependency formatting, build configurations, and documentation.

  • Reformats dependency definitions in Cargo.toml and enables binary stripping.
  • Updates documentation to instruct users to install rustup and link the toolchain properly.
  • Refactors build.py to route cargo invocations via rustup and adjust environment setups.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
native/src/Cargo.toml Reformats library dependency definitions and changes the strip flag to true.
docs/build.md Updates development instructions to use rustup and clarifies toolchain linking steps.
build.py Alters the cargo invocation by setting RUSTUP_TOOLCHAIN and refactors clippy and paths.
Comments suppressed due to low confidence (3)

native/src/Cargo.toml:67

  • Enabling binary stripping may remove essential debug symbols; please confirm this change is intended for production builds rather than development.
strip = true

build.py:237

  • RUSTUP_TOOLCHAIN is being set to a file system path instead of a toolchain identifier (e.g., 'stable' or 'nightly'); please verify that rustup accepts this format to ensure the proxy functions correctly.
env["RUSTUP_TOOLCHAIN"] = str(rust_sysroot)

build.py:671

  • The globals for cargo and rust_bin have been removed in favor of rust_sysroot; ensure that the cargo binary is available in the system PATH when relying solely on rustup.
rust_sysroot = ndk_path / "toolchains" / "rust"

@topjohnwu topjohnwu merged commit 1523ed9 into master Apr 1, 2025
27 checks passed
@topjohnwu topjohnwu deleted the rust branch April 1, 2025 17:01
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