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

Separate WASM lib #62

Merged
merged 13 commits into from
May 16, 2024
Merged

Separate WASM lib #62

merged 13 commits into from
May 16, 2024

Conversation

matthiasgeihs
Copy link
Member

@matthiasgeihs matthiasgeihs commented May 8, 2024

This PR proposes a refactor of the WASM lib.

  • Bundles the lib with the WASM file.
  • Can be used within web browser and Node.js.

Background: We want to have the same interface for FROST and DKLS libs, so that they can be integrated easily within MPC Core Kit. WASM should be packaged separately, so that we can keep size of core kit bundle low.

project shouldn't have two locks files. removing yarn.lock because we
seem to be using package-lock.json more commonly in the context of tss.
- revise client lib for easier upgrading through usage of wasm-pack
  with --omit-default-module-path
- add tss-lib-wasm package that separately holds the wasm file. this
  allows loading the wasm from a package on demand and keeping the
  size of tss-lib low.
Copy link
Contributor

@metalurgical metalurgical left a comment

Choose a reason for hiding this comment

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

May have reviewed this prematurely.

There are some good things about this PR, however some of the deletions need to be checked.

packages/web-example/src/local.ts Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
packages/tss-client/src/client.ts Outdated Show resolved Hide resolved
packages/tss-client/src/client.ts Show resolved Hide resolved
packages/tss-lib/babel.config.js Show resolved Hide resolved
packages/tss-lib/rollup.config.mjs Show resolved Hide resolved
packages/tss-lib/tsconfig.build.json Show resolved Hide resolved
@matthiasgeihs matthiasgeihs marked this pull request as ready for review May 15, 2024 04:06
@metalurgical
Copy link
Contributor

Please add a PR to dkls for this with updated build instructions this as well.

@matthiasgeihs
Copy link
Member Author

Please add a PR to dkls for this with updated build instructions this as well.

Thanks for the reminder! 🙏
https://github.com/torusresearch/dkls/pull/31

@matthiasgeihs
Copy link
Member Author

added tests and ci as well

Copy link
Member

@himanshuchawla009 himanshuchawla009 left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@metalurgical metalurgical left a comment

Choose a reason for hiding this comment

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

+1

@himanshuchawla009 himanshuchawla009 merged commit d789ca4 into master May 16, 2024
1 check passed
@matthiasgeihs matthiasgeihs deleted the feat/wasm-lib branch May 16, 2024 08:12
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

Successfully merging this pull request may close these issues.

3 participants