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

Update Web Worker UI Docs #1046

Merged
merged 46 commits into from
Oct 9, 2024
Merged

Update Web Worker UI Docs #1046

merged 46 commits into from
Oct 9, 2024

Conversation

ymekuria
Copy link
Contributor

@ymekuria ymekuria commented Sep 26, 2024

Summary

This PR adds documentation on how to integrate web workers in a UI with o1js to coincide with the improvements in the reference implementation that were introduced with this PR. The documentation provides an example of how to use the comlink package introduced in the reference implementation to simplify the communication with web workers.

Closes #1047

Impact

Currently web workers are necessary to build performant and usable UIs with o1js. Integrating and managing web workers with o1js is complex, and hard to manage according to many developers on discord. These developers have requested that we simplify the process. This step by step example documentation coupled with the improved web worker reference implementation improves the DX.

Changes

  • Sections on worker and worker client setup was added
  • Instructions on how to use comlink added
  • Updated UI Implementation code added to documentation steps

Future Plans

The long term goal is to eliminate the need for web workers with updates to o1js. In the short term we are aiming to improve the DX of building UIs with changes like this one. The example implementation and documentation will be incrementally improved until we reach the longer term goal with improvements to o1js.

Copy link

vercel bot commented Sep 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 3, 2024 9:51pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
07-oracles ⬜️ Ignored (Inspect) Visit Preview Oct 3, 2024 9:51pm

@ymekuria ymekuria marked this pull request as ready for review October 1, 2024 22:06
@ymekuria ymekuria requested a review from a team as a code owner October 1, 2024 22:06
@ymekuria ymekuria merged commit 0282795 into main Oct 9, 2024
4 checks passed
@ymekuria ymekuria deleted the feature/update-webworker-docs branch October 9, 2024 17:44
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.

Add web worker and comlink integration section
3 participants