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

Kyber not compiling with React #89

Open
TheMagicNacho opened this issue May 26, 2023 · 0 comments
Open

Kyber not compiling with React #89

TheMagicNacho opened this issue May 26, 2023 · 0 comments

Comments

@TheMagicNacho
Copy link

Issue: When using the npm package pqc-kyber within a react framework, the application will not complie.

Discussion: My current assumption is there is an issue with WASM dependencies when getting the react's webpack to compile the WASM.

Alternatively, WASM pack is not compiling from rust to WASM with the correct dependencies.
Some steps I have already tried:

  1. Compile the package myself.
  2. Modify the webpack for WASM
  3. Install wasm-loader for react

Recommendation: I think if the collective group could look at this problem we could find a solution. React is one of the most popular front end frameworks, so if we could get this package work with react we could increase adoption.

This is the exact error I see:

Uncaught TypeError: wasm.keypair is not a function
    keypair pqc_kyber_bg.js:189
    App App.js:7
    React 11
    workLoop scheduler.development.js:266
    flushWork scheduler.development.js:239
    performWorkUntilDeadline scheduler.development.js:533
    js scheduler.development.js:571
    js scheduler.development.js:633
    factory react refresh:6
    Webpack 24
pqc_kyber_bg.js:189

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant