Live data from Hacker News

Show HN: Cap'n-rs – Rust implementation of Cloudflare's Cap'n Web protocol

github.com

11–20 of 36 posts

Re: Show HN: Cap'n-rs – Rust implementation of Cloudflare's Cap'n Web protocol

#11
post #9

Okay the name is very unfortunate. "Cap'n-rs" sounds like it's gonna be a Rust implementation of Cap'n Proto, the much older and more widely used and more widely known serialization format. But I guess this is just to be expected from AI slop.

This is someone's rust port of the new "cap'n web" protocol Kenton just released, which he's calling a spiritual sibling to cap'n proto (which he also built). This might be AI slop but this info is all in the OP, come on man!

I know all that already and none of it goes against what I said, so why the antagonistic tone?

I do think that Kenton shares some of the blame by making their new JSON-based schemaless RPC system so similarly named to their old binary schema-based serialization format... I don't get the reasoning there. But that doesn't change what I said.

Re: Show HN: Cap'n-rs – Rust implementation of Cloudflare's Cap'n Web protocol

#12
Despite everyone hating on the AI slop (I myself hate AI slop), I am excited about cap'n web and am jonesing to try it out in rust so I will take a look!

I'd love to see (might try to add on) an optional type layer: define contracts as json schema or JTD or something? Does something like this already exist - maybe you could use protobufs ontop of this? Would be nice to make it so that you didn't need to share types between client / server out of band, something like an openapi spec allows all clients (not just those you are in control of) to have types!

Re: Show HN: Cap'n-rs – Rust implementation of Cloudflare's Cap'n Web protocol

#13
post #11

Earlier quoted context omitted.

This is someone's rust port of the new "cap'n web" protocol Kenton just released, which he's calling a spiritual sibling to cap'n proto (which he also built). This might be AI slop but this info is all in the OP, come on man!

I know all that already and none of it goes against what I said, so why the antagonistic tone? I do think that Kenton shares some of the blame by making their new JSON-based schemaless RPC system so similarly named to their old binary schema-based serialization format... I don't get the reasoning there. But that doesn't change what I said.

Yeah fair enough, I guess the core of it might just be the similar names!

Re: Show HN: Cap'n-rs – Rust implementation of Cloudflare's Cap'n Web protocol

#14

Despite everyone hating on the AI slop (I myself hate AI slop), I am excited about cap'n web and am jonesing to try it out in rust so I will take a look! I'd love to see (might try to add on) an optional type layer: define contracts as json schema or JTD or something? Does something like this already exist - maybe you could use protobufs ontop of this? Would be nice to make it so that you didn't need to share types b…

To be honest, I don't really understand the point of Cap'n Web.. it's a slightly better JSON-RPC I guess?

I'm a fan of Cap'n Proto, but I don't understand how Cap'n Web is in any way related to it nor what makes it a big deal.

Re: Show HN: Cap'n-rs – Rust implementation of Cloudflare's Cap'n Web protocol

#15
post #8

"I built" more like claude-code built. Also I don't know what the rush is to get a shiny new Rust implementation out asap that you need to vibe code the entire thing. The Github stars couldn't be that serious. Also the disclaimer at the end "Built with Ready for production use is a strong strong claim when the entire thing is vibe-coded.

The two big signifiers that something is "ready for production use" are: 1) it has been successfully been used in production at some scale for a while, and 2) it has some commitment to API stability. A 1 week old project on version "0.1.0" is neither, whether vibe-coded or not.

Re: Show HN: Cap'n-rs – Rust implementation of Cloudflare's Cap'n Web protocol

#16
post #14

Despite everyone hating on the AI slop (I myself hate AI slop), I am excited about cap'n web and am jonesing to try it out in rust so I will take a look! I'd love to see (might try to add on) an optional type layer: define contracts as json schema or JTD or something? Does something like this already exist - maybe you could use protobufs ontop of this? Would be nice to make it so that you didn't need to share types b…

To be honest, I don't really understand the point of Cap'n Web.. it's a slightly better JSON-RPC I guess? I'm a fan of Cap'n Proto, but I don't understand how Cap'n Web is in any way related to it nor what makes it a big deal.

The selling point is promise pipelining, being able to do many chained operations with a single api call

This includes the freaky way they found to make this work with map

Re: Show HN: Cap'n-rs – Rust implementation of Cloudflare's Cap'n Web protocol

#18
Regarding the concept, it's cool to see you using LLMs to quickly generate protocol versions.

But asking the community to review an AI-generated implementation week-old announced protocol, is more or less putting the recently coined-term AI "workslop" upon others. It doesn't really matter if it happens to be a good implementation or not.

There are two main issues I can think of right now:

1) Work going into the protocol is only useful for your implementation of it. The capnweb-core crate depends on the tokio runtime, and parts of the protocol/definitions are in the client crate:

https://github.com/currentspace/capn-rs/blob/a816bfca5fb6ae5...

What if someone wants to leverage work into the core parts of the protocol to use a different runtime or no-std?

2) The project has namespace squatted/swiped the best name for the official implementation of the project. I understand Rust/Crates-IO allows for this free-for-all, but isn't it entirely possible that Cloudflare already has Rust crates for this that they might open source? Or if someone else wants to make a competing implementation? Maybe it's just me, but I like to put my organization prefix on all my crates in the event I ever open source any of them.

Would you offer to transfer the crate names to Cloudflare if they were going to offer an implementation -- just like what happened with protobuf/Google?

Re: Show HN: Cap'n-rs – Rust implementation of Cloudflare's Cap'n Web protocol

#19
post #17

https://github.com/currentspace/capn-rs/blob/main/capnweb-co... mmm delicious slop may i have more please sir

Right, for example, there are no comments on why something there is something called a PromiseIdAllocator that starts with the magic number "1":

https://github.com/currentspace/capn-rs/blob/a816bfca5fb6ae5...

Yet there is a public interface that allows for initialization with "0":

https://github.com/currentspace/capn-rs/blob/a816bfca5fb6ae5...

It's like the LLM was able to predict that 1 is needed in the protocol, but wasn't relevant to check in the boilerplate.

I don't have a problem with newtype-all-the-things to ensure correctness in some areas, but no comments/constants does not lead to confidence.

Post reply on HN