Skip to content

no_std support #70

Closed
Closed

Description

@Oakchris1955

Short Description:

Support for building and running duplicate in no_std environments

Motivation:

The library itself is great, it is however a pity it doesn't support no_std targets. While the majority of Rust code that is written depends on the standard library one way or another, I don't see a reason why this one, with its simple design and purpose, shouldn't have support for no_std environments.

Design

Replace all std use statements with core and alloc ones and any use of HashMaps and HashSets with ones from the hashbrown crate.

Misc:

Since either case we need to depend on Rust's alloc library, perhaps that should be mentioned?

Activity

  1. added
    D-discussionA decision (D) has not been made yet and is open to discussion
    I-featureThis issue (I) regards a (potential) feature in the project
    on Jun 20, 2026
  2. added
    T-acceptedTriage (T): Initial review accepted issue/PR as valid
    and removed
    T-newTriage (T): Has yet to be reviewed
    on Jun 22, 2026
  3. Emoun commented on Jun 22, 2026

    @Emoun
    Owner

    Thank you for the interest in this crate.

    What is the purpose of this change? duplicate is a compile-time only crate, so the fact that it uses std should not limit its use for code that is used in a no_std environments. If I'm misunderstanding, please give me an example use case where this is an issue (especially if its an issue for you).

  4. Oakchris1955 commented on Jun 22, 2026

    @Oakchris1955
    Author

    That... seems to be right? I had been using another crate prior to duplicate and that one for whatever reason refused to compile in a no_std environment, so when I found duplicate I didn't even check if that was the case here.

  5. added
    D-rejectedA decision (D) has been made and the issue will not be worked on
    and removed
    D-discussionA decision (D) has not been made yet and is open to discussion
    on Jun 22, 2026
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

    D-rejectedA decision (D) has been made and the issue will not be worked onI-featureThis issue (I) regards a (potential) feature in the projectT-acceptedTriage (T): Initial review accepted issue/PR as valid

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions