Remix.run Logo
jasonjmcghee 6 days ago

I took the time to build an agent from scratch in rust, copying a lot of ideas from claude code, and using Qwen3 Coder 30B - 3.3B does really well with it. Replicating the str_replace / text editor tools, bash tool, and todo list and a bit of prompting engineering goes really far.

I didn't do anything fancy and found it to do much better than the experience I had with codex cli and similar quality to Claude Code if I used sonnet or opus.

Honestly the cli stuff was the hardest part but I chose not to use something like crossterm.

ptrj_ 5 days ago | parent [-]

How have you found the current experience of (async) networking in Rust? This is something which is stupidly easy out-of-the-box in Python -- semi-seriously, async/await in Python was _made_ for interacting w/ a chat completions/messages API.

(As an aside, my "ideal" language mix would be a pairing of Rust with Python, though the PyO3 interface could be improved.)

Would also love to learn more about your Rust agent + Qwen3!

jasonjmcghee 5 days ago | parent [-]

I would pick rust for doing async over python every time, if it's the only consideration.

In python there are hidden sharp edges and depending on what dependencies you use you can get into deadlocks in production without ever knowing you were in danger.

Rust has traits to protect against this. Async in rust is great.

I'd do something like:

let (tx, rx) = std::sync::mpsc::channel(); thread::spawn(move || { // blocking request let response = reqwest::blocking::get(url).unwrap(); tx.send(response.text().unwrap()); });

Or

let (tx, mut rx) = tokio::sync::mpsc::channel(100); tokio::spawn(async move { let response = client.get(url).send().await; tx.send(response).await; });

ptrj_ 5 days ago | parent [-]

> In python there are hidden sharp edges and depending on what dependencies you use you can get into deadlocks in production without ever knowing you were in danger.

I've heard of deadlocks when using aiohttp or maybe httpx (e.g. due to hidden async-related globals), but have never managed myself to get any system based on asyncio + concurrent.futures + urllib (i.e. stdlib-only) to deadlock, including w/ some mix of asyncio and threading locks.