zig 写的 100kb 的 wasm 可以 http 读写任意 git 仓库

4 月 25 日
 est

https://blog.cloudflare.com/artifacts-git-for-agents-beta/

entire git protocol engine is written in pure Zig (no libc), compiled to a ~100KB WASM binary.
Support for both v1 and v2 of the git protocol.
support capabilities including ls-refs, shallow clones (deepen, deepen-since, deepen-relative), and incremental fetch with have/want negotiation.

有人知道这玩意开源不?不开源能扒出来别的地方用不?

2126 次点击
所在节点    git
7 条回复
shyrock
4 月 26 日
这个能干啥
kneo
4 月 26 日
扒出来也只有只有核心的 git 功能,你让 AI 用 zig 写一个最简版本的 git 也许还更省事。
rb6221
4 月 26 日
场景就是和 AI 对话的时候可以方便的持久化、版本控制你的对话内容,以及产出内容,用 git 的方式实现
codehz
4 月 26 日
git 那个协议也没复杂到需要 wasm 来做啊。。。感觉就是有锤子找钉子的问题
est
4 月 27 日
@codehz 还是挺复杂的。pack/unpack/sha1 这些轮子都得从 0 搓。

首先 cf worker 没有 fs 模块,这就搞死一大堆人了。一搓一个不吱声。。。不是简单 libgit2 转一下能解决的。
codehz
4 月 27 日
@est 我说的是 https://isomorphic-git.org/ 这个
est
4 月 27 日
@codehz 用过。 https://blog.est.im/2026/stdout-08

你可以试试通过它实现 shallow clones (deepen, deepen-since, deepen-relative) 。。。超蛋痛。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://v2ex.xtra.eu.org/t/1208543

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX