Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/no threads feat for zk sdk #35514

Conversation

leonardkulms
Copy link
Contributor

Problem

Currently, the spawning of threads makes it impossible to use the zk sdk in a wasm environment.
At the same time, per default it only uses one thread (and is quite fast still) anyway.

I would like to use the zk-sdk in a wasm project without having to fork it or (as I currently have) to copy a big part of the DiscreteLog functionality and replace the little part where it spawns a thread in a similar way as this PR does.

Summary of Changes

  • adds a feature called enable-threaded that is enabled by default
    
  • consequently does what it has done before, unless enable-threaded is disabled: it will do the same but without spawning a thread for it.
    
  • adds a test that can also be compiled with feature flag as e.g.
    

cargo test --package solana-zk-token-sdk --no-default-features

@anza-team anza-team closed this Apr 15, 2024
Copy link
Collaborator

@anza-team anza-team left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution! This repository is no longer in use. Please re-open this pull request in the agave repo: https://github.com/anza-xyz/agave

@mergify mergify bot added community Community contribution need:merge-assist labels Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Community contribution need:merge-assist
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants