5 ms·
Problems of Rust: In Rust, there is a central package registry (crates.io), but there is a lack of ability to add dependencies using git URLs. Problems of Swif
by r2vcap 3y ago
Problems of Rust:
In Rust, there is a central package registry (crates.io), but there is a lack of ability to add dependencies using git URLs.
Problems of Swift:
Swift can add dependencies using git URLs, but there is no central package registry.
Both languages should have a central package registry and the ability to add dependencies using git URLs, as it would make flexible dependency management much easier. For a central package registry, it makes it easier to find popular packages, but it has a problem of centralization.
- LawnGnome 3y agoRust does have this: you can specify dependencies from other registries or Git repositories pretty easily. (See https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-other-registries https://doc.rust-lang.org/cargo/reference/specifying-depende... for the exact Cargo.toml syntax.)
- moltonel3x 3y agoRust does support adding deps using git urls, alternate repositories, filesystem paths, and even multiple sources for one dep. https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-other-registries https://doc.rust-lang.org/cargo/reference/specifying-depende...
- r2vcap 3y agoI was wrong :(
- deleted 3y ago[deleted]
- shakow 3y ago> but there is a lack of ability to add dependencies using git URLs. There is absolutely no lack of that in cargo; this is literally the first sentence in the relevant section in the doc (https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html https://doc.rust-lang.org/cargo/reference/specifying-depende...): Your crates can depend on other libraries from crates.io or other registries, *git repositories*, or subdirectories on your local file system.