Coder Social home page Coder Social logo

Comments (12)

skyzh avatar skyzh commented on May 24, 2024 3

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.

steveklabnik avatar steveklabnik commented on May 24, 2024 2

https://gmjosack.github.io/posts/dissecting-cratesio-minimum-mirror/

from crates.io.

happyaron avatar happyaron commented on May 24, 2024 1

@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.

sfackler avatar sfackler commented on May 24, 2024

This would also involve adding support for non-Github auth (preferably LDAP) and non-S3/Github storage.

from crates.io.

alexcrichton avatar alexcrichton commented on May 24, 2024

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.

sfackler avatar sfackler commented on May 24, 2024

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.

weiznich avatar weiznich commented on May 24, 2024

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.

gilescope avatar gilescope commented on May 24, 2024

This feels linked to rust-lang/rust#44931

from crates.io.

ishitatsuyuki avatar ishitatsuyuki commented on May 24, 2024

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.

happyaron avatar happyaron commented on May 24, 2024

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.

Turbo87 avatar Turbo87 commented on May 24, 2024

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.

Turbo87 avatar Turbo87 commented on May 24, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.