Comments (12)
We have built a tool to mirror static.crates.io
at https://github.com/sjtug/mirror-clone . Meanwhile, we have also set up an experimental full-mirror of static.crates.io
at https://s3.jcloud.sjtu.edu.cn/899a892efef34b1b944a19981040f55b-oss01/crates.io/crates/{crate}/{crate}-{version}.crate
from crates.io.
https://gmjosack.github.io/posts/dissecting-cratesio-minimum-mirror/
from crates.io.
@Turbo87 maybe a proprietary tool is not sufficient to close this issue, as a person who runs public mirror for various FLOSS, I'd like to find an open source solution, :)
from crates.io.
This would also involve adding support for non-Github auth (preferably LDAP) and non-S3/Github storage.
from crates.io.
Architecturally I believe it's relatively easy to do. A "mirror" would essentially just be a clone of the official index along with an updated download url in its configuration. Updating a mirror would just be updating the index and perhaps downloading all the new versions that were created.
Implementing this, however, and getting cargo to think that mirrors and normal registries are the same would be somewhat difficult.
@sfackler, those may be more useful for non-official entire instances, as I would suspect that a mirror would reflect whatever the crates.io site uses. That being said, I'd love for it to be easy to spin up a local instance of a registry to use entirely independently (with a number of configuration options like auth/storage). Might be a bit harder though :)
from crates.io.
At work we use Artifactory to both serve as a repository for internal packages and to provide a transparent mirror/cache of the maven.org packages we use. New packages are transparently pulled down as needed, but we don't mirror the whole world since that'd be crazy. Something like that would probably be best served as a separate project, though it'd hopefully be able to pull in a bunch of the logic/types from crates.io.
from crates.io.
I've written a simple caching server. Similar to Artifactory it pulls down transparently those crates that are really requested. Currently it is only a simple application without any interface or anything. Also it only mirrors an index. It's not possible to add or yank crates to the mirror.
from crates.io.
This feels linked to rust-lang/rust#44931
from crates.io.
For initial fetch, we should provide daily database dumps which is less overhead to serve and better compressed.
For dynamic syncing, the Kubernetes model is a very friendly way to organize the API.
from crates.io.
Would like to bump this issue a bit since it looks like not getting love from guys for a long time - people from certain parts of the world (in my case, China mainland) does not have decent connectivity to some most used CDNs, so that mirroring is a must for getting a decent speed of using the repository.
Almost all the other languages have some form of mirroring being widely used, for example[1] we have CPAN/CTAN/CRAN, pypi, julia, etc. There are lots of Nexus instances to partially mirror the Maven Central repository. If crates.io can be mirrored in some way, it will surely make Rust users' lives easier in those places.
[1]https://mirrors.tuna.tsinghua.edu.cn/
[2]tuna/issues#941
a bit background: TUNA mirror is the largest syncing source of other mirrors in the country, with an average rsync traffic of more than 1Gbps
from crates.io.
seeing as e.g. Artifactory now supports Rust (see https://www.jfrog.com/confluence/display/JFROG/Cargo+Registry) I guess we can close this :)
from crates.io.
@happyaron absolutely, I would prefer that too. what I meant to say was that if Artifactory can build it then the necessary things are there for open source tools to also build something like this and there is nothing left on the crates.io side that we would need to build to enable this :)
from crates.io.
Related Issues (20)
- Policy on large prebuilt libraries on crates.io?
- Problem with Image source at https HOT 1
- Page still has Twitter logo HOT 2
- asimetria cpp rust stdout HOT 4
- Ellipsoid 0.3.1 is not compatible with stable build HOT 2
- api/v1/crates?per_page=100&page=201 ERRORS HOT 2
- https://crates.io/crates?page=201&sort=new. Something Went Wrong! HOT 1
- 30 seconds timeout is too short for cargo publish HOT 2
- Check autorisation HOT 1
- Use non-200 HTTP response status codes for API errors HOT 6
- Problem when trying to install a specific version
- v1 api breaks on crate "new"
- robots.txt is too restrictive, preventing Discord from generating embeds HOT 3
- Admin action plan HOT 9
- #7941 broke searches with spaces in them HOT 3
- crates.io's TOML snippet with metadata produces warnings when used in `Cargo.toml` HOT 2
- Download graphs not starting at y=0
- `recent_crate_downloads` materialised view is not refreshed with the new download counting implementation HOT 1
- 'Browse All Crates' results in `Something Went Wrong!' HOT 1
- API token expiry warning emails HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crates.io.