rust-lang / rust-lang/rustup

Please set the rust lib source code read only to prevent the code change by accident.

Open
#2,550 2 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Rust
Stars
7k
Forks
1.1k
Avg merge
22h 40m
Merged PRs (30d)
46

Description

Describe the problem you are trying to solve
I am using vscode with auto save on for development. Then I can navigate to the source code of some types in rust lib. For example ~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/marker.rs.But the problem is that the core lib code can be modified by accident and saved automatically.

Describe the solution you'd like
The language like golang can save go mod lib files read only in $GOPATH/pkg/mod directory. The vscode will prompt an error when saving the file when the lib code was modified by accident.For example dr-x------ goleveldb@v1.0.1-0.20190318030020-c3a204f8e965 in $GOPATH/pkg/mod/github.com/syndtr dirctory.

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 tracing how rustup installs Rust toolchain source under ~/.rustup/toolchains/.../lib/rustlib/src/rust, especially the library sources such as core/src/marker.rs. Check how the requested read-only permissions could be applied to installed source files and directories across supported systems. Done means accidental edits prompt a save error while the installed sources remain usable for navigation.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.