Skip to content

Q: How to share implementation between scoped APIs and dynamic APIs #5

Description

@crlf0710

Static-analysis friendly scoped APIs

What's the common API pattern

Failure modes

Dynamic APIs still with dependency

On process-level resources: std::io::stdin() and std::io::Stdin:

On thread-level resources: rand::random() and rand::ThreadRng:

Reference counting and interior mutability

More approaches?

How to share code as much as possible if your crate wants to support both or more.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions