News for hackers. Stuff that matters.

yuri91

Show HN: Codex CLI compiled to WASM running in the browser

https://browsercode.io/agents/codex

Hi HN! As part of our ongoing work on BrowserPod, an in-browser WebAssembly sandbox, we have significantly expanded what the Rust WebAssembly target can achieve.Our approach proved so robust that we could get the whole Codex CLI (~1.25M lines of Rust, excluding dependencies) to run in the browser, with extremely minimal modifications.Now, Codex CLI by itself could not do much, but BrowserPod...

( Read More... | 1 comment | 4 points | on HN )
if anyone is curious about the technical details, I recently gave a talk about BrowserPod's architecture at the Wasm I/O conference. The recordings of the talks are being published on their YT channel (https://www.youtube.com/playlist?list=PLP3xGl7Eb-4P9UDywG2NO...), but mine is not there yet.
Re:Edge.js: Run Node apps inside a WebAssembly sandbox on Tuesday March 17, 2026 @04:53PM (#47418135)
I work on a project that does exactly that (and more): https://browserpod.io/.

Currently it supports Node, but we plan to add Python, Ruby, git, and more.

You can see it in action in this demo: https://vitedemo.browserpod.io

More info here: https://labs.leaningtech.com/blog/browserpod-10

Ah and kudos to Syrus and his team for this release. Edge.js's architecture seems to have many similarities with BrowserPod. I see it as proof that we are both going in the right direction!

Show HN: BrowserPod – In-browser Node.js, Vite, and Svelte with full networking

https://vitedemo.browserpod.io

The code runs entirely in the Browser.Inbound and Outbound networking are provided with the help of Cloudflare Workers, and the dev server is reachable from the Internet as long as the tab is open.See https://labs.leaningtech.com/blog/browserpod-annoucement for more info or ask anything here.

( Read More... | no comments | 2 points | on HN )
Re:Agentic Coding Recommendations on Thursday June 12, 2025 @06:19AM (#44255908)
So using agents forces (or at least nudges) you to use go and tailwind, because they are simple enough (and abundant in the training data) for the AI to use correctly.

Does this mean that eventually in a world where we all use this stuff, no new language/framework/library will ever be able to emerge?

Competing with the existing alternatives will be too hard. You won't even be able to ask real humans for help on platforms like StackOverflow because they will be dead soon.

Re:WASM 2.0 on Friday May 09, 2025 @11:57AM (#43938263)
On the Web, you can do that today. This is what https://webvm.io does for example. It jit-compiles Wasm modules at runtime from the original X86.
For reference, when loading https://browsercraft.cheerpj.com for the first time (up to loading a world), my browser downloaded ~32MB.

The second time almost nothing.

Re:Is WebAssembly Memory64 worth using? on Thursday January 16, 2025 @03:28AM (#42722843)
Looking forward to progress on the memory control proposal(s). Another reason to want more than 4GB of memory is to have more address space, assuming that you have the ability to map it. With that capability Wasm64 could be useful also for apps that don't plan to use a huge amount for real.
it does if you log in with Tailscale (networking tab in the side bar).

The terminal-based https://webvm.io has it pre-installed but the graphical demo running Alpine does not.

Luckily, the package manager also works so you can install it with `apk add curl`

Re:Show HN: Compiling C in the browser using WebAssembly on Wednesday October 09, 2024 @02:30AM (#41785092)
It is a bit unfair to Wasmer, because it incur in the (presumed) overhead of `wasmer run ...`, but I could not figure out if the actual clang binary is directly available after it is downloaded the first time.
Re:Show HN: Compiling C in the browser using WebAssembly on Tuesday October 08, 2024 @05:29AM (#41775345)
very unscientific benchmark of `clang hello.c`, after a few runs to make sure the code is downloaded/cached:

jslinux: 4.7s

wasmer: 1.3s

webvm: 1.2s

It's now possible to run Java Web Start applications fully in the browser without any plugins: https://cheerpj.com/cheerpj-jnlp-runner/

It's based on CheerpJ, a JVM that runs in the browser (using JS and Wasm).

Re:Stop Hiding the Sharp Knives: The WebAssembly Linux Interface on Thursday December 14, 2023 @12:52AM (#38638249)
Could you elaborate on how you solved the issue? A link to the relevant code would be nice.
I don't necessarily disagree, but implementing these things in your custom runtime is easy. I am more interested in how they achieved them in the more constrained browser environment.
I am curious about the browser compatibility layer.

Does it support networking? (And if so, is it using a proxy to connect to the internet or is it using a virtualized network layer that stays in the browser?)

How is fork implemented? (Asyncify all the code?)

I was looking at the Github org page (https://github.com/wasix-org), but I can't figure out where this stuff is.

I agree. I implemented a subset of WASI, and the best resource was an autogenerated C header with function signatures and very terse comments, buried in the WASI SDK repo.
Re:Italian Data Protection Authority Clamps Down ChatGPT on Friday March 31, 2023 @08:10AM (#35385835)
Yeah I mean, I wouldn't trust the accuracy of its answer. But I find it funny that it agrees that OpenAI should comply.
Re:Italian Data Protection Authority Clamps Down ChatGPT on Friday March 31, 2023 @07:42AM (#35385551)
I asked ChatGPT what it thinks about this ruling:

As an AI language model, I do not collect personal data directly as I do not have access to user information. However, I understand that OpenAI, the company that developed and manages the platform, has been ordered to temporarily limit the processing of data of Italian users and is under investigation by the Italian Data Protection Authority.

As an AI language model, my purpose is to provide conversational assistance and generate human-like text based on the input provided by the user. My training data is sourced from publicly available text on the internet and does not specifically target any individual or collect personal data.

I understand that OpenAI has been accused of not providing adequate information to users regarding the collection and storage of personal data and not having a legal basis for such collection. I cannot comment on OpenAI's specific policies and practices regarding data collection and storage, as I am not privy to such information.

However, I believe that it is important for companies to prioritize user privacy and to comply with data protection regulations. I hope that OpenAI will take the necessary measures to address the concerns raised by the Italian Data Protection Authority and implement appropriate safeguards to protect the personal data of its users.

Indeed, as I said it can be a downside.

What we usually suggest is to compile most of the application to Wasm (which is also the default), and move the parts that most interact with the outside world to JS.

This can actually result in a speedup if it avoids multiple back-and-forths between JS and Wasm, which is common if you use a Browser/JS api from Wasm.

Disclaimer: I work on Cheerp.

We do include the C (Musl) and C++ (Clang's libcxx) standard libraries.

And we do have some custom LLVM passes to improve code size and performance (See for example [1] and [2]).

But the main selling point in my opinion is the ability to target JavaScript, and (almost) freely mix data and code compiled to either JS or Wasm.

Emscripten can also target JS, but it still retains the linear memory model of Wasm (or X86, Arm, ...), which means that what you get in the end is a big TypedArray and operations on it using basic types.

With Cheerp, code compiled to JS uses an object memory model: a C++ object will become a garbage-collected JS object. While this has some limitations (you can't do unsafe casts and treat your memory like it's a big array, because it isn't), it allows seamless integration with the Browser (or any third-party) APIs:

- You can store a DOM element directly in your C++ objects (instead of doing everything through tables)

- You can directly manipulate JS Strings instead of constantly converting back and forth to C strings

- You can create nice zero-overhead interfaces to use your C++ classes from manually written JS

- Or, you can just write your whole program in C++, including callbacks for DOM events and whatnot

And you can still compile the peformance-sensitive or type-unsafe parts of your code to Wasm (losing access to some convenience in exchange for speed).

You can get an idea from the Pong tutorial [3], although it's a bit of a contrived example to showcase what can be done.

[1] https://medium.com/leaningtech/partialexecuter-reducing-weba...

[2] https://docs.leaningtech.com/cheerp/Cheerp-PreExecuter.html

[3] https://docs.leaningtech.com/cheerp/Cheerp-Tutorial-Mixed-mo...

Re:Java in the Browser on Tuesday August 23, 2022 @10:13AM (#32565226)
That is also possible: https://docs.leaningtech.com/cheerpj/Getting-Started

See "Converting an applet"

Re:Java in the Browser on Tuesday August 23, 2022 @09:33AM (#32564694)
Here you go: https://chrome.google.com/webstore/detail/cheerpj-applet-run...

CheerpJ does exactly that: it ships a full JVM implementation (including Swing/AWT, Threads, ...) that runs in JS/Wasm inside your browser. The Applet Runner extension detects applets in the page and runs them through CheerpJ.

The example that you list seems to work.

Re:Just-in-time code generation within WebAssembly on Thursday August 18, 2022 @03:16PM (#32513724)
By "Wasm JIT API in JavaScript" I mean a native way for the browser to support the JIT use-case.

Generating entire modules works, but it has a number of issues.

For example, you need to carefully decide how big your modules are going to be:

- Too small, and you end up compiling many many modules, which eventually crashes the browser if you don't dispose of the old ones

- Too big (many functions batched together), and you have too much latency before your code is available to run

Being able to compile a single function to add to an existing module (or something like that) would help a lot.

Older »