Please set the rust lib source code read only to prevent the code change by accident.
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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