-
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
Web3 on pyodide #3088
base: main
Are you sure you want to change the base?
Web3 on pyodide #3088
Conversation
apologies for letting this PR go without comment @joemarshall. thank you for the initiative. talked to the team and we agreed that being able to host a learning environment in a browser would be great, though likely not something we can invest much time in before end of year. there was hesitation about including the code in the main branch, so current thinking is to try maintaining this in a separate branch. i didn't follow your comment exactly. can you clarify? by all of web3, are you including aiohttp and websockets? planned adding and removing of stubs would further support this living on a different, experimental branch. |
i didn't follow your comment exactly. can you clarify? by all of web3, are you including aiohttp and websockets? planned adding and removing of stubs would further support this living on a different, experimental branch. I think sync http right now, but you're right - planning for experimental branch to remove stubs as things get ported in pyodide would make sense to me. |
This is the basic patch for it to be possible to build and run web3.py on webassembly using pyodide.
It works for synchronous http only right now. Calls to async or websockets functions will raise exceptions,
Right now it is at the point where:
should work
I built a pyodide distribution with it in here:
https://joemarshall.github.io/web3_py_on_web/dist/console.html
Still todo on this is bits that are outside web3.py itself:
#3056