Crates.io is Rust community developers provide a code repository and document, why swift no such website

Rut language is very popular in recent years. Many developers like rust because there are websites like crates.io that provide complete development documentation and rapid development experience for developers. At the same time, rust also draws lessons from many features of the swift language, why swift does not have a website like crate.io.

There is some website in the Swift ecosystem that match the crates.io scope IMHO
One example could be:

1 Like

https://swiftpackageindex.com don't support like cargo add demo , In terminal add the package directly to the current project,the development documentation and source code still have to be viewed on github, Not very convenient.

For packages that enable documentation it can be viewed directly on the Package Index website, for example you can find documentation for Swift Syntax hosted there directly.

Swift favours a decentralised approach. You are free to choose any host for your repository and documentation, and you will not (should not, to the extent we can help it) suffer an inferior developer experience from that decision.

For example, SPI is a project that community members created using their own initiative. If anybody feels they can do better, they are welcome to set up a competing service. The built-in tools don't favour one provider over another.

4 Likes

Decentralised approach is a good thing, but I feel that this way will reduce the development efficiency, if you have read rust's docs.rs development document, it is very readable and can quickly use crate in development.