Live data from Hacker News

Zerostack – A Unix-inspired coding agent written in pure Rust

crates.io

61–70 of 334 posts

Re: Zerostack – A Unix-inspired coding agent written in pure Rust

#61
post #30

Earlier quoted context omitted.

I actually though about this issue, but while Pi can have this script-like environment thanks to the fact that it's based on an interpreted language (TypeScript), Rust has its own limitation as a compiled language. I decided to allow for customization in a different way: 1. The prompt library (~/.config/hypernova/prompts/) acts as a simpler alternative to Skills, with the built-in prompts that should replace superpow…

I've been trying to use `Deno` underneath `Rust` so that the tools can still be written in Typescript and thus self-mutated without the compilation step (but I can still try to do clever things with V8 Isolates or similar). It's been an ugly experiment so far; I'm vaguely thinking a simpler model would be to just define a binary "API" and run tools by exec-ing binaries.

Have you thought about Zig? If you limit it to CompTime, isn't that just a scripting language that happens to be compiled to binary?

Re: Zerostack – A Unix-inspired coding agent written in pure Rust

#62

Now make it into an IntelliJ plugin which has proper access to the search index. I’ll pay for it. For Christs sake it’s insane JetBrains hasn’t figured this out yet

I think this is such an opportunity for JetBrains. I talked to them about this at AWS Re-Invent, strangely, they could really see how strong of a position they are in if only they paid attention to the right thing!

Re: Zerostack – A Unix-inspired coding agent written in pure Rust

#63

i built something with a similar philosophy here: https://github.com/khimaros/airun -- it is intended to be piped and redirected. it discovers skills, AGENTS and prompt templates from Claude Code, Pi.dev, OpenCode and others. no TUI, but does have a basic tool calling loop $ airun -q -p 'output a shell command for linux to display the current time. output only the command with no other code fencing or prose' | airun…

While I think that the core philosohpy is the same, i'd like to ask: why adding features like Skills and prompt templates? I personally decided to not implement Skills and instead using a prompt library approach, where certain .md are used to fully replace the system prompt, in order to allow for an approach similar to Skills with ~100 LoC dedicated to this system.

Aren't skills fairly easy to share, and can contain more than one file?

Re: Zerostack – A Unix-inspired coding agent written in pure Rust

#64

"RAM footprint: ~8MB on an empty session, ~12MB when working" I like this, Claude Code is using multiple gigabytes, which is really annoying on lowend laptops

I've been trying to migrate over the zed and think they're Agent Client Protocol[1] is pretty neat, I wonder how much memory pressure Claude Code exerts if it is going through that mechanism instead

1: https://zed.dev/acp

Re: Zerostack – A Unix-inspired coding agent written in pure Rust

#66

Earlier quoted context omitted.

Isn't that because of the context window size?

The context window has nothing to do with RAM usage and even if it did, a million tokens of context is maybe 5mb.

It has nothing to do with local RAM usage. But a million tokens of LLM context is decidedly not 5mb.

The rough estimate is 2 * L * H_kv * D * bytes per element

Where:

* L = number of layers * H_kv = # of KV heads * D = head dimension * factor of 2 = keys + values

The dominant factor here is typically 2 * H_kv * D since it’s usually at least 2048 bytes. Per token.

For Llama3 7B youre looking at 128gib if you’re context is really 1M (not that that particular model supports a context so big). DeepSeek4 uses something called sparse attention so the above calculus is improved - 1M of context would use 5-10GiB.

But regardless of the details, you’re off by several orders of magnitude.

Re: Zerostack – A Unix-inspired coding agent written in pure Rust

#67
Are agent harnesses the new web framework?

Everyone wants to write one, building a new one is easy to start with, but tough to get to “prod ready” and the landscape is littered with failed attempts?

Certainly feels like it.

This is really good though; works well and at least has a clearly articulated raison d'être.

Re: Zerostack – A Unix-inspired coding agent written in pure Rust

#68
post #20
post #3

this is what I've been waiting for a low level language. please no more scripting language TUIs!

Rust, a language with affine types, generics, lifetimes, deep static analysis, hygienic macros, etc is not low-level. It's nearly as high-level as Haskell (without HKTs though). It just does not rely on GC and allows to manage resources efficiently. This efficiency is partly due to its being so high-level.

Agreed, Rust is way more expressive than people give it credit for.

Re: Zerostack – A Unix-inspired coding agent written in pure Rust

#69
post #32

Earlier quoted context omitted.

Since the OP stated they used DeepSeek V4 Flash for generating a lot of the code, I decided to check whether there were any outdated dependencies. In my experience, with Rust projects, if you do not instruct models (even Claude 4.7 Opus) to use `cargo add` instead of manually editing the Cargo.toml, you will almost certainly get out-of-date dependencies added to your project. Manually checking the dependencies used b…

Hidden telemetry was my big concern, yes; the abort thing wasn't caught as a security thing by DeepSeek V4 Flash but it was mentioned by Claude 4.7 Opus (I wanted to compare and contrast here), and Flash brought it up later when I asked it about performance tuning. `cargo add` tip is very helpful, I had a hunch this happened in my own Rust project and I think you just filled in the missing piece for me there.

To me panic=abort is much safer security as it means you’re unlikely to enter weird states due to incorrectly handled unwinding. The only attack vector is a DOS attack which is a short term thing that’s easily rectified.

Re: Zerostack – A Unix-inspired coding agent written in pure Rust

#70
post #25

Thanks, I've been tooling away in my spare time on my own version of this -- both to get a deeper understanding of agents (everyone suggests writing your own) and to help learn Rust. I'd like to retain `pi`'s configurability though, the ability to self-mutate and generate new tools is incredibly useful, particularly because I don't think any of these things should have access to arbitrary code execution through `bash…

I’ve been doing the same thing in zig haha.
Post reply on HN