rust-lang / rust-lang/stacker

Bootstrapping `psm` is non-trivial

Open
#141 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
360
Forks
78
PR merge metrics
No merged PRs in 30d

Description

I'm working on bootstrapping a Rust toolchain and psm was a compiled dependency. Due to the amount of binary artifacts included in the vendored Rust tarball, I added a pass to remove all .o, .a, .so, .lib, .dll, and .exe files while also stripping all executable bits. In doing so, I noted psm failed to build due to expecting wasm.o.

Building wasm.o myself was easy enough, the command to do included in the wasm.s file. Unfortunately, my wasm.o differs from the vendored wasm.o, so not only can I not reproduce the wasm.o included in the repository (presumably due to the age of the toolchain it was created with), the Rust build won't continue as the package's digest has changed.

While I can continue the work on patching the build system on my end, just patching the .cargo-checksum.json file (which I have to do for all other crates which also committed binary artifacts, and the Cargo.locks) I'd like to open the issue upstream that psm cannot be bootstrapped/reproduced and request the build.rs build the wasm.o, as done for all other targets. I would guess the decision was made years ago to ship the artifact due to the lack of WASM toolchains laying around, but I'd hope this can be revisited now?

Contributor guide

No contributing guide indexed for this repository

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 with psm's build.rs and the wasm.s file, including the build command documented there. Check how wasm.o is currently supplied and how other targets are built. Done means the build process generates wasm.o instead of relying on the vendored artifact and remains reproducible without requiring a checksum workaround.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.