rust-lang / rust-lang/nomicon

Elaborate mutable globals?

Open
#9 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
CSS
Stars
2.3k
Forks
325
PR merge metrics
No merged PRs in 30d

Description

Hi,

I started reading the Rustonomicon. This is a great read. thx!

https://doc.rust-lang.org/nomicon/references.html

Tragically, plenty of data doesn't reside on the stack, and we must also accommodate this. Globals and thread-locals are simple enough to model as residing at the bottom of the stack (though we must be careful with mutable globals). Data on the heap poses a different problem.

I think I understand well up to this point about paths in the ownership tree, but get lost as to why mutable globals need a special attention.
Can you elaborate this part?

Thx

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 the referenced Rustonomicon references page and the paragraph about globals, thread-locals, and mutable globals. Read the surrounding ownership-tree discussion to identify what the passage assumes, then determine how the explanation should clarify the special concern. Done means the relevant documentation answers the question without leaving the ownership model ambiguous.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.