Back to News
Advertisement
Advertisement

⚡ Community Insights

Discussion Sentiment

100% Positive

Analyzed from 450 words in the discussion.

Trending Topics

#wasm#python#https#inside#micropip#pyodide#install#runtime#browser#import

Discussion (15 Comments)Read Original on HackerNews

simonw•about 4 hours ago
I've been looking forward to this for ages!

This means we can now take any C/Rust/whatever extension for Python, compile that as a `.wasm` extension, and then load it directly in browser Pyodide projects using:

  await micropip.install("package-on-pypi")
  import package_name
Here's how to try the new feature out. Visit https://pyodide.org/en/stable/console.html and type:

  import micropip
  await micropip.install("pydantic_core")
  import pydantic_core
That gets you this WASM wheel: https://pypi.org/project/pydantic_core/#pydantic_core-2.47.0...

You can tell that it's got compiled code in (and not just Python) by running:

  pydantic_core._pydantic_core
I get this:

  <module 'pydantic_core._pydantic_core' from '/lib/python3.14/site-packages/pydantic_core/_pydantic_core.cpython-314-wasm32-emscripten.so'>
simonw•about 3 hours ago
I had an older experimental Pyodide WASM project lying around (a packaging of the Luau language by Roblox) so I had Codex package that up for me and pushed it to PyPI.

Here's the package: https://pypi.org/project/luau-wasm/

  import micropip
  await micropip.install("luau-wasm")
  import luau_wasm
  print(luau_wasm.execute(r'''
  local animals = {"fox", "owl", "frog", "rabbit"}
  table.sort(animals, function(a, b) return #a < #b end)
  for i, name in animals do print(i .. ". " .. name .. " (" .. #name .. ")") end
  '''))
And an interactive demo page where you can try it out: https://simonw.github.io/luau-wasm/

Wrote about this in more detail on my blog: https://simonwillison.net/2026/Jun/13/publishing-wasm-wheels...

willXare•about 2 hours ago
`await micropip.install()` is starting to feel dangerously close to "just ship the whole universe to the browser."
12_throw_away•about 4 hours ago
Executing normal python programs inside a cpython vm inside a wasm context inside a javascript process inside a sandbox inside a browser is - genuinely - extremely exciting! (Might as well run the browser inside a container inside a VM while you're at it though.)
willXare•about 2 hours ago
We heard you like runtimes, so we put a runtime in your runtime inside your runtime.
apitman•about 2 hours ago
I'm sure everyone has seen this by now but just in case: https://www.destroyallsoftware.com/talks/the-birth-and-death...
rvz•about 2 hours ago
This sounds like a solution looking for an unnecessary security nightmare.

Something as little as the runtime can just get exploited (which that as happened.) and cause a sandbox escape on the client side. There was a Chrome 0day at the runtime level which allowed untrusted code to run and escape the sandbox in the WASM runtime.

This complete worship of WASM (and their runtimes) as this magical silver bullet reminds me of the days and failures of Native Client (NaCL), Java Applets and Flash all over again.

simonw•about 1 hour ago
You mean this one? https://theori.io/blog/a-deep-dive-into-v8-sandbox-escape-te...

I dunno, one sandbox escape in nine years is a pretty solid track record IMO.

Any reason WASM is more dangerous than regular JavaScript?

efromvt•25 minutes ago
Fantastic to have PyO3/Maturin guides too - the rust/python/typescript turducken I’ve always wanted.
wolfgangK•about 4 hours ago
I presume this works (will work) also for JupyterLite that is based on Pyodide ? Would be great if it helped getting the latest OpenCV-python version [0] and it's dnn goodies being available on a zero-install client side Notebook !

[0] https://news.ycombinator.com/item?id=48421858

simonw•about 4 hours ago
Yeah it should definitely work there, anything you can `micropip.install()` into a Pyodide environment will work with JupyterLite.
willXare•about 2 hours ago
Python in the browser keeps sounding ridiculous right up until it works.
fzumstein•about 3 hours ago
Pyodide 314.0 is already available in xlwings Lite (the Python in Excel alternative you actually wanted).
runningmike•about 4 hours ago
Great news. And indeed a nice step to an even broader Python ecosystem.
sgammon•about 3 hours ago
nice to see JS/python interop becoming a thing