Skip to content

Only import getrandom when used #2187

Closed as not planned
Closed as not planned

Description

@gjermundgaraba

We currently have a problem stemming from this library because getrandom is included even when it not necessary (I believe).

The core of the issue is that we have a CosmWasm (wasm based) smart contract where the wasm32-unknown-unknown environment does not allow randomness (it does not have access to JS) and fails to build because of the dependency of getrandom (coming from ring).

Our issue tracking this is here: lfdt-ibc/ibc-contracts#155

We got a comment suggesting this could be solved by avoiding the import under the conditions it is not used: lfdt-ibc/ibc-contracts#155 (comment)

Activity

  1. briansmith commented on Feb 9, 2025

    @briansmith
    Owner

    In a future version, we maybe could make features that depend on randomness optional. Which features (algorithms) of ring are you using?

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