rust-lang / rust-lang/rust

`./configure` should generate a Makefile that bypasses python

Open
#149,150 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-feature-request T-bootstrap
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Summary

There are a few motivations for this.

  • It would be nice to have testing that the cargo run --manifest-path src/bootstrap path works and continues to work. This unlocks future work in the area if we care to do it.
  • The cpython devs are considering using Rust in their build, which causes dependency cycle issues for distro maintainers. Having a way to bypass python would avoid issues for them.
  • This should respect build.cargo and build.rustc, and fall back to python if they're unset. Doing this in the shell scripts is hard, because I don't want them to parse toml. But python can and does parse --set flags already, so I don't mind putting this in configure.py.

See around #t-infra/bootstrap > fyi: rust in cpython @ 💬 for further discussion.

Command used
./configure
make
Expected behaviour

A generated BOOTSTRAP := cargo build --manifest-path src/bootstrap/Cargo.toml && cargo run --manifest-path src/bootstrap/Cargo.toml -- build

Actual behaviour

BOOTSTRAP := /opt/homebrew/opt/python@3.13/bin/python3.13 /Users/jyn/src/ferrocene4/src/bootstrap/bootstrap.py

Bootstrap configuration (bootstrap.toml)

n/a (generated by ./configure)

Operating system

macOS Sequoia 15.5 (24F74)

HEAD

branched from 6e41e619773. no changes to ./configure or src/bootstrap/configure.py.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading ./configure and src/bootstrap/configure.py, then run ./configure followed by make to inspect the generated BOOTSTRAP command. The change is complete when the Makefile can use cargo run with src/bootstrap/Cargo.toml, respects build.cargo and build.rustc, and falls back to bootstrap.py when those settings are unset.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, rust
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.