-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Feature: wasm32 / emscripten support #3056
Comments
i'd love to support learners with a hosted version of web3.py! couple things on my mind as i read:
|
@wolovim would love to assist you in this! Can I take it up? |
@ameya-deshmukh thanks for offering! just checked in with @joemarshall who's down the rabbit hole already. we talked about an MVP version that he's getting started with. keep an eye out for updates or opportunities here. |
@wolovim An initial PR that lets you build and run web3 on pyodide is here #3088 In the end I had to mock the aiohttp and websockets modules - the positives are that it gives you nice errors if you try and use async things - the negatives are that it is micropip / pyodide specific (but then pyodide is currently the only web python with decent package loading anyway). The alternative of separating out async would require quite a lot of code reorganisation in web3.py. Thoughts welcome on it. I guess I see it as being a stepping stone towards a time when pyodide supports aiohttp (client only) and websockets clients properly. |
So, I did some work on running web3.py on webassembly / emscripten, so as to be able to run it in a web browser / jupyterlite notebook, without having to install any software on the user's machine.
This is potentially useful for teaching purposes, to be able to run demo code in the browser, but also worth doing, as webassembly is gaining quite a lot of traction in container / cloud platforms.
In terms of how this works, I see this work as being possible in multiple stages, each of which gains some functionality:
The text was updated successfully, but these errors were encountered: