4
25
Fork
You've already forked setup-zig
4

Implement easy mirroring solution #15

Closed
opened 2024年09月20日 05:17:50 +02:00 by mlugg · 5 comments
mlugg commented 2024年09月20日 05:17:50 +02:00 (Migrated from github.com)
Copy link

Right now, the easiest way to set up a mirror is using Mach's Wrench. This works pretty well, but is written in Go and is part of a larger project. It'd be nice to have a more minimal solution.

So, we should make one! It should expose an HTTP server locally, take requests for files, and cache them in a given directory, with some reasonable eviction policy. SSL is out of scope for this project; a local web server can be used to rproxy to the mirror software instead.

I reckon this should be pretty easily doable in a couple of hundred lines of Zig.

Right now, the easiest way to set up a mirror is using Mach's Wrench. This works pretty well, but is written in Go and is part of a larger project. It'd be nice to have a more minimal solution. So, we should make one! It should expose an HTTP server locally, take requests for files, and cache them in a given directory, with some reasonable eviction policy. SSL is out of scope for this project; a local web server can be used to rproxy to the mirror software instead. I reckon this should be pretty easily doable in a couple of hundred lines of Zig.
jiacai2050 commented 2024年09月25日 05:11:41 +02:00 (Migrated from github.com)
Copy link

Hi, I would like to give it a try, where do you think we can put this mirror? this repo or something else.

Hi, I would like to give it a try, where do you think we can put this mirror? this repo or something else.
nektro commented 2024年09月25日 05:27:54 +02:00 (Migrated from github.com)
Copy link

new repo would definitely make the most sense

new repo would definitely make the most sense
nektro commented 2024年09月25日 05:29:07 +02:00 (Migrated from github.com)
Copy link

i'd bet you could even do it in pure caddy or nginx config without any zig at all, but that exploration would be up to whoever decided to tackle this

i'd bet you could even do it in pure caddy or nginx config without any zig at all, but that exploration would be up to whoever decided to tackle this
jiacai2050 commented 2024年09月26日 18:10:42 +02:00 (Migrated from github.com)
Copy link

https://github.com/jiacai2050/zms

This is my initial implementation, any feedback is welcome.

https://github.com/jiacai2050/zms This is my initial implementation, any feedback is welcome.
mlugg commented 2025年06月30日 17:43:39 +02:00 (Migrated from github.com)
Copy link
Superseded by ziglang/www.ziglang.org#490.
Sign in to join this conversation.
No Branch/Tag specified
main
v2.2.1
v2
v2.2.0
v2.1.0
v2.0.5
v2.0.4
v2.0.3
v2.0.2
v2.0.1
v2.0.0
v1
v1.2.2
v1.2.1
v1.2.0
v1.1.1
v1.1.0
v1.0.0
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mlugg/setup-zig#15
Reference in a new issue
mlugg/setup-zig
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?