Skip to content

Should the "custom" feature take precedence over the "js" feature? #346

@josephlr

Description

@josephlr

Currently the "custom" feature is last in our precedence order for selecting implementations. The original idea behind this was to ensure that a crate couldn't (accidentally or intentionally) change the RNG source for a program.

Sometimes folks are targeting wasm32-unknown-unknown, bu they are not targeting the web, but their deps are enabling the js feature. #342 CC: @nickray

I would propose the following new precedence order:

  • If on a supported target, use the standard implementation
  • If custom feature is enabled, use the custom implementation
  • If on wasm32-unknown-unknown and js is enabled, use the wasm-bindgen implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions