Skip to content

Build rust with rustpkg #2237

Closed
Closed

Description

@brson

As discussed in this week's meeting, let's rewrite our build system in Rust.

We made a good effort but the current Makefile-based system has collapsed into a black hole of endless macros and meta-programming. The first thing the build does is download a copy of rustc, so let's just use that to orchestrate the rest of the build.

This could make bootstrapping new architectures even more interesting, but we like to be on the bleeding edge.

Activity

  1. nikomatsakis commented on Apr 19, 2012

    @nikomatsakis
    Contributor

    FWIW, I don't think it changes much for building on new architectures. Most of the build is still building rustc itself. To run our tests, we need to build the compiletest framework, which is in Rust. So, essentially, when doing the 64-bit port at least, I spent 75% of the time just getting rustc to build. it'll be the same on other architectures, I imagine.

  2. graydon commented on Apr 19, 2012

    @graydon
    Contributor

    My main hesitation on this is that we'll wind up snapshotting a lot more: any time we enhance the builder or fix a bug in it. Maybe we should track builder snapshots separately? The whole toolchain is not small.

    (for that matter, tracking llvm snapshots separately from rustc might also be reasonable. Hm. Why aren't we just storing stage0 binaries in git?)

  3. brson commented on Apr 19, 2012

    @brson
    ContributorAuthor

    I don't think we need to snapshot the builder. The build shell script will use the stage0 rustc to build the builder, then the builder takes over.

  4. catamorphism commented on Apr 19, 2012

    @catamorphism
    Contributor

    I milestoned this as 1.0, but let me know if you think that's too ambitious :-)

  5. graydon commented on Apr 19, 2012

    @graydon
    Contributor

    Ok, so we need to keep enough shell-and-make around to accomplish the download and compile-the-builder steps. Possible, yeah.

    (I am still curious about whether it'd be reasonable to just store stage0 binaries in git. I'm not sure why we didn't do that in the first place.)

  6. ghost assigned on Aug 9, 2012
  7. graydon commented on Sep 12, 2012

    @graydon
    Contributor

    See also #2238. These tasks are, I think, related. Also both mine! so I will merge the bugs at my own leisure :)

  8. graydon commented on Dec 21, 2012

    @graydon
    Contributor
  9. brson commented on Dec 21, 2012

    @brson
    ContributorAuthor

    @graydon we didn't do it by personal preference. I thought it was nice to bootstrap off the smallest possible set of files. I don't particularly agree with that decision any more.

  10. graydon commented on Mar 25, 2013

    @graydon
    Contributor

    non-critical for 0.6, de-milestoning

  11. graydon commented on Apr 25, 2013

    @graydon
    Contributor

    nominating for backwards-compatible milestone

  12. catamorphism commented on May 10, 2013

    @catamorphism
    Contributor

    Re-titled to reflect that this is about making rustpkg build Rust, and re-assigning to myself.

    We don't have an 0.8 milestone, but I'd like this to happen for 0.8.

  13. darnuria commented on Feb 13, 2014

    @darnuria
    Contributor

    (I make a tour of easy/interresting bug) And It seems this bug was resolved by design by dropping rustpkg no?

  14. brson commented on Feb 13, 2014

    @brson
    ContributorAuthor

    I think not since rust will have a package manager and we will want to dogfood it.

  15. reem commented on Jul 29, 2014

    @reem
    Contributor

    This issue has long since passed its relevance and should be replaced with an issue to build with cargo, if that's feasible.

  16. alexcrichton commented on Jul 29, 2014

    @alexcrichton
    Member

    I've opened a more specific issue for cargo: #16091

  17. added a commit that references this issue on Sep 22, 2022
  18. added a commit that references this issue on Feb 11, 2025
  19. added a commit that references this issue on Aug 21, 2026
  20. added a commit that references this issue on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-driverArea: rustc_driver that ties everything together into the `rustc` compilerC-enhancementCategory: An issue proposing an enhancement or a PR with one.E-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions