rust-lang / rust-lang/nomicon

Providing foreign globals

Open
#95 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

The current discussion only mentions how to access foreign globals. That is, if a global variable is provided in some C library, how to access it from Rust.

How does one provide foreign globals from Rust, so that C libraries can access them (e.g. via extern ...) ?

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

No file or test is named. Read the Nomicon discussion of accessing foreign globals, then determine how Rust can provide globals for C libraries through the extern interface. Done means the documentation explains this reverse direction with a clear example and distinguishes it from accessing C-provided globals.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, 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.