Skip to content

Clarify when dependencies are linked #64731

Closed
@dhardy

Description

@dhardy

The reference documents that exern crate has some documentation on linkage of dependencies, but appears to relate to Edition 2015 (or at least not mention linking without extern crate).

We are considering use of extern "Rust" and #[no_mangle] for custom backends in getrandom (standalone demo), however before proceeding would like to know:

  1. if we can rely on this poorly documented aspect of the language
  2. why "multiple definition" errors are not always present when declaring multiple backend libs with extern crate

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsA-linkageArea: linking into static, shared libraries and binariesC-enhancementCategory: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions