-
Notifications
You must be signed in to change notification settings - Fork 88
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(wasm): add beerus-web
wasm library
#756
Conversation
d60a89e
to
2f646d3
Compare
Current problem is that blocking IO must be called from single-threaded JS runtime, which in practice is impossible. There are two strategies:
I am currently pursuing both approaches simultaneously to investigate the best way to proceed, but just one of them to work should be enough. |
b3be902
to
182871f
Compare
At this point the blocking IO is no longer an issue - the easiest way to make it work was to run beerus in a web worker, and inject blocking http call through JavaScript function. Currently the problem is with parsing Sierra program from Felt252: the root cause is that Some extra juggling with dependencies and features was necessary to ensure that the same codebase can compile to both |
The PR is ready for review. @LKozlowski @ICavlek PTAL. |
2018063
to
8f93c1e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added couple of comments, but in general excellent job :) I have managed to run it from my side and I had no issues :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, please also check the package-lock.json, license value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went through the PR commit by commit and got the general idea behind that PR. It's a huge PR and as you said there are still a lot of rough edges that need to be polished in the future, but as for the general it seems very easy to follow. I haven't found anything particularly odd that needs to be fixed now. I mostly checked the rust code and skimmed through JS, as I assume this is just for demo purposes for now and will be heavily changed in the future. I think we should merge it as soon as possible and set up a job that will test the wasm code regularly.
The most important thing is that it is working, and the details of it can be ironed out very easily.
This PR brings proper WebAssembly support to Beerus.
The demo web page is added in order to showcase expected usage.
Reference:
Closes #692
Closes #674