frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Show HN: Firefox in WebAssembly

https://developer.puter.com/labs/firefox-wasm/
72•coolelectronics•1h ago
This is the entire Firefox browser rendering to a <canvas> element. Gecko, all UI components, and the Spidermonkey JS engine are all compiled and running in WebAssembly.

Here are a few things you might find interesting:

- This is fully end to end encrypted! We use the WISP protocol for TCP-over-websockets.

- There is a novel WASM->JS JIT for experimental site speedup

- This port cost over 25k in opus/fable tokens for debugging and JIT research

This was just a fun experiment to push the boundaries of WebAssembly. For a more usable "browser in browser" experience, we also built https://github.com/HeyPuter/browser.js that eats a bit less RAM.

Comments

throwaway2027•1h ago
Obligatory https://www.destroyallsoftware.com/talks/the-birth-and-death...
rlmineing_dead•1h ago
I had this in mind when I first saw this project too LOL

Every year I need to rewatch this talk

mdlxxv•1h ago
"Yo dawg. I herd you like web browsers, so I put a browser in your browser, so you can browse the Web while you browse the Web".
ent101•1h ago
should've used this in the splash screen :(
eqrion•1h ago
> There is a novel WASM->JS JIT for experimental site speedup

I would love to see the details for this. SpiderMonkey had an attempted wasm32 JIT backend, but it was never finished.

edit: Apparently it also has some sort of WebAssembly interpreter backend too, which SpiderMonkey doesn't have.

som•1h ago
... doesn't support Firefox mobile apparently :D
rlmineing_dead•1h ago
Does firefox mobile (Android, since firefox mobile iOS is a WebKit wrapper) support about:config settings? if so you can enable wasm_js_promise_integration in about:config and have it working likely. I will test this on my Pixel 10 pro
rlmineing_dead•53m ago
hi reporting back, yes stock firefox mobile wont work but the BETA version will because it just added the WASM feature needed (firefox 153 adds it but regular mobile firefox lacks about:config support it seems)

and by "will work" I mean will render the first frame and then freeze

YMMV

coolelectronics•1h ago
Oh and for anyone asking, you can run firefox-wasm inside firefox-wasm inside firefox! I only got this to load once though since it gets pretty unstable at that level.
degamad•1h ago
I'm so glad this exists, I've been considering doing something like this for a few months.

I recently got a TV based on VIDAA os, a locked-down linux-based OS where everything is rendered from Web pages. It has a built-in browser that doesn't support ad-blocking (I suspect VIDAA is profiting from showing ads on the TV), and you can't install new apps unless they're Web pages.

This would hopefully allow one to run Firefox within the existing browser, then install uBlock Origin within Firefox... I know what this weekend's project is going to be...

coolelectronics•56m ago
We also plan on adding extension support to https://github.com/HeyPuter/browser.js soon, which should hopefully cover use cases like that as well without the full overhead
shevy-java•30m ago
Firefox should really bundle ublock origin as-is. I install it afterwards anyway but I don't understand Mozilla here. They seem to want to stay behind Google.
quantummagic•22m ago
In 2024, "search royalties" brought in approximately $585 million for Mozilla, largely from Google. It's not hard to see why they tread very lightly around ad blocking. It's actually impressive that ublock remains easy and painless to install as an extension.
MajesticHobo2•56m ago
Browser sandboxing is now fully solved.
yjftsjthsd-h•10m ago
In mean... It kinda feels like this is legitimately true? An attacker trying to do anything on a user's machine through this would have to find a Firefox vulnerability and a vulnerability in the wasm runtime, which is such a high bar that I would actually feel remarkably safe running this thing. The only question is how performance works and whether there are any pain points using as a daily driver, but those feel likely to be a pretty minor point. Oh, and the usual caveat that an attacker can still compromise things inside the sandbox which does leave a certain amount of exposure (but if you run different things in different instances they're isolated).
azakai•53m ago
Prior art: WebKit.js, the WebKit rendering engine ported to JS

https://github.com/trevorlinton/webkit.js/

sangeeth96•52m ago
edit: I misunderstood, that's $25k not 25k tokens :/ time to log off.

this is so rad! 25k tokens is a lot less than i thought this'd take -- what were the difficult bits in the porting process? also, was firefox preferred because parts of it are already in rust?

coolelectronics•44m ago
$25k of tokens, closer to 30 billion I believe. It only took a few days to actually get the engine up, the hard parts where most of the effort was spent was squeezing out performance and increasing stability, as well as attempting the JIT.

Firefox was chosen because its single-process support was in a better place than chromium/blink. WebKit is also possible, it was done by a friend of mine earlier https://github.com/theogbob/WebkitWasm

sangeeth96•37m ago
ah, i misunderstood. that seemed way too low in terms of actual tokens lol. i'll log off now. interesting details and didn't know about WebkitWasm. hope to read more soon.
ohonbob•47m ago
Since coolelectronics posted his firefox wasm here ill post my sideproject (we worked on these around the same time), Webkit In WebAssembly (And actually modern and usable! Unlike the older trevorlinton/webkit.js project)

https://github.com/theogbob/WebkitWasm

Not as polished as the firefox port but is a fully working port of webkit ported with fable, opus and some glm 5.2.

jedisct1•34m ago
"This browser doesn't support WebAssembly JSPI, which Firefox WASM needs to run."
zerof1l•23m ago
All the network traffic from that browser is routed through a server. My IP inside that browser was in India and on CloudFlare network. I don’t particularly trust Puter. Why not route traffic through my actual browser?
ent101•20m ago
Puter's networking is open-source and e2e encrypted. Also, a regular browser doesn't give access to raw TCP sockets used for this, so it wouldn't be possible to route through your browser.
kevincox•19m ago
Because the web browser can't make arbitrary network connections. Even if it was implemented intercepting at the HTTP layer (which would probably be much more difficult than just intercepting the low level socket operations) you wouldn't be able to properly manage CORS headers, cookies and various other things.
rlmineing_dead•19m ago
The TCP proxy exit node we're using is running on Cloudflare, you can check that your traffic is still TLS encrypted by OpenSSL (also compiled to webassembly). The browser does not have a native API to send raw TCP so the proxying is done by the http://github.com/MercuryWorkshop/wisp-protocol protocol. You can check your packets in dev tools, look for a socket connection with "puter.cafe" as the host for our TCP proxy. This application is meant to be a demo for it actually (why it says at the bottom that its powered by puter networking). That is the only server side component of this.
Retr0id•
yjftsjthsd-h•7m ago
>This port cost over 25k in opus/fable tokens for debugging and JIT research

> This was just a fun experiment to push the boundaries of WebAssembly

I'm a huge fan of the project, but I have to ask. If spending $25k is a "fun experiment", where exactly is your threshold for serious work?

brewmarche•4m ago
Can’t get it running on Firefox 152.0.6 (aarch64), no extensions.

  [chrome-demo] chrome assets ready
  [gecko] warning: unsupported syscall: __syscall_madvise
  [gecko] embed-xul: main() on the app pthread (PROXY_TO_PTHREAD)
  [gecko] embed-xul: GECKO_GL_PASSTHROUGH=1
  [gecko] embed-xul: GECKO_COARSE_CLOCK=1
  [gecko] embed-xul: GECKO_GPU=1 (GPU/WebRender->canvas rendering)
  [gecko] xul_init: GRE dir = /gre
  [gecko] Pthread 0x11051000 sent an error! blob:https://developer.puter.com/edc1bd0a-b844-4a18-a69a-63dd49dc304a:8906: SecurityError: Security error when calling GetDirectory
5m ago
I was reading your landing page at https://developer.puter.com/networking/ and was very confused by how you were achieving the "with no server or proxy" part, until much further down the page:

> "the connection is tunneled over a single WebSocket to a Puter relay"

Come on, it's both a server and a proxy, and it doesn't stop being those things just because you're calling it a relay.

Show HN: Firefox in WebAssembly

https://developer.puter.com/labs/firefox-wasm/
72•coolelectronics•1h ago•28 comments

Show HN: misa77 - a codec that decodes 2x faster than LZ4 (at better ratios)

https://github.com/welcome-to-the-sunny-side/misa77
121•nonadhocproblem•6h ago•39 comments

Show HN: Low-latency local LLM runner via OpenJDK Panama FFM (Java 22)

https://github.com/projectargus-cc/libargus.cc
19•KingJoker•1d ago•2 comments

Show HN: Microcosm Industries – Simulation toys and software microcosms

https://microcosm.industries/
12•arbesman•5d ago•1 comments

Show HN: Capn-hook for coding agents – don't grep the same mystery twice

https://github.com/cyrusNuevoDia/capn-hook
25•knrz•3d ago•5 comments

Show HN: Swagsocial

https://swag.nomaakip.xyz/browse
2•wishyt•32m ago•0 comments

Show HN: Dropper

https://dropper.page
4•johnwheeler•51m ago•0 comments

Show HN: Pullboard – a work queue for agents, built to run a quant desk

https://pullboard.dev/
2•Olscore•1h ago•0 comments

Show HN: Redis Rubix Bridge a HTTP API Redis Gateway

https://github.com/rubix-studios-pty-ltd/rubix-redis-bridge
2•rubixvi•1h ago•0 comments

Show HN: Spellsurf – Create words from words

https://spellsurf.com/
5•alexakten•2h ago•5 comments

Show HN: Chariot – Elastic Claw Compute

https://www.chariots.sh/
5•benmax•1h ago•0 comments

Show HN: BibleFollow – Scroll the Bible instead of doomscrolling

https://biblefollow.com
10•timsayshey•2h ago•1 comments

Show HN: Heard for iOS: ePub reader with on-device text to speech

https://heard.quest/
3•alana314•2h ago•0 comments

Show HN: Autoportrait Playground – painting timelapses in the browser

https://philipweiss.net/autoportrait/
2•philipfweiss•1h ago•1 comments

Show HN: GitHub Contribution Graph Painter

https://contributist.stupidity.works/en
2•fabianse•1h ago•0 comments

Show HN: webcast.social – Got MP3s? Host your own radio show from the browser

https://webcast.social
2•freshman_dev•1h ago•0 comments

Show HN: 18KB ls alternative in no_std rust and Libc

https://crates.io/crates/fli-tool
19•tracyspacy•9h ago•4 comments

Show HN: PostgreSQL Now Supported in DBTrail

https://github.com/dbtrail/dbtrail
2•nethalo•1h ago•1 comments

Show HN: ScreenshotAPIs – screenshot/PDF API with credits that never expire

https://screenshotapis.org
3•screenshotapi•2h ago•0 comments

Show HN: Make senders work to get into your inbox

https://www.captchainbox.com
40•felixdoerp•10h ago•65 comments

Show HN: For 10 World Cups, my model's 2 favorites had the champion every time

https://papers.ssrn.com/sol3/papers.cfm?abstract_id=7013338
33•fabioricardo7•11h ago•46 comments

Show HN: Painterly – Turn pictures into digital paintings without generative AI

https://github.com/jbunke/painterly
16•flinkerflitzer•5h ago•4 comments

Show HN: Vendo (YC S26) – Let your users add their own features to your product

https://github.com/runvendo/vendo
2•yousefh409•2h ago•4 comments

Show HN: A web based VistaPro clone

https://toby.github.io/vista/
8•tobypadilla•21h ago•0 comments

Show HN: Marketing for Solo Technical Founders

https://www.frhog.com/?solo
2•krm01•2h ago•0 comments

Show HN: Gate.cat – block an AI coding agent's rm -RF before it runs

https://gate.cat/
2•bgmlai•2h ago•0 comments

Show HN: An incremental build cache for Rust on GHA

https://github.com/clipper-registry/cache/tree/main/rust
2•a_t48•2h ago•0 comments

Show HN: SirixDB 1.0 Beta – Git-Like Versioning, Diffs, Time-Travel Queries

https://github.com/sirixdb/sirix
10•lichtenberger•7h ago•1 comments

Show HN: NetBox plugin that turns config changes into Grafana annotations

https://github.com/mfarook2/netbox-grafana-annotations-plugin
2•mfarook•2h ago•0 comments

Show HN: OpenClaw for Your Health

https://www.withmurph.ai
4•willhay•2h ago•2 comments