Create WebAssembly Components with Python and componentize-py
Python has had an interesting run in our industry for a language named after the Monty Python comedy troupe. It has been used for scripting, data science, machine learning, deep learning, web applications, and more. Its popularity is largely due to its easy-to-read syntax and the fact that it supports procedural, object-oriented, and functional programming styles. It is a horrible language for numerically intensive tasks, but with Numpy, Cython, hardware acceleration, and various other techniques, it can be shaped into a suitable way of doing even these demanding workloads.
Now, thanks to WebAssembly, Python is finding its way into the browser and as a potential implementation language for producing and consuming WebAssembly components. In this Shortcut, I am going to show you the basics of using Python to create WebAssembly components with a tool called componentize-py. If you have read the “Create WebAssembly Components with JavaScript and jco” Shortcut, this tool will serve a similar role to the componentize-js tool. Like its JavaScript-oriented counterpart, componentize-py does a lot more than we could realistically cover in one Shortcut, so we will return to these tools in the future.
In the GitHub repository for this Shortcut, you should enter the directory 25-Wasm-Components-Python. In it, you will find a readme.md file describing the installation ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access