Support specifying crate names and versions separated by forward slashes rather than hyphens. Since slashes are not valid in crate names, this
makes splitting the tokens trivial and free of regular expressions. Effectively, the slash variant is roughly 180% faster:
Hello Michał,
On Fri, Jun 16, 2023 at 3:09 PM Michał Górny <mgorny@gentoo.org> wrote:
Support specifying crate names and versions separated by forward slashes rather than hyphens. Since slashes are not valid in crate names, this makes splitting the tokens trivial and free of regular expressions. Effectively, the slash variant is roughly 180% faster:
As a developer using Rust I want to note that Cargo has a concept of
"package ID specification"[1] that usually uses pkgname@version
syntax, but AFAIK there's no prior art for using pkgname/version in
the ecosystem. Could it make sense to use pkgname@version for
consistency?
On Fri, 2023-06-16 at 17:48 +0300, Denis Lisov wrote:
Hello Michał,
On Fri, Jun 16, 2023 at 3:09 PM Michał Górny <mgorny@gentoo.org> wrote: >> > Support specifying crate names and versions separated by forward slashes >> > rather than hyphens. Since slashes are not valid in crate names, this
makes splitting the tokens trivial and free of regular expressions.
Effectively, the slash variant is roughly 180% faster:
As a developer using Rust I want to note that Cargo has a concept of
"package ID specification"[1] that usually uses pkgname@version
syntax, but AFAIK there's no prior art for using pkgname/version in
the ecosystem. Could it make sense to use pkgname@version for
consistency?
I suppose so. The only reason I've used slash is because that could be
used directly in URL.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 399 |
Nodes: | 16 (2 / 14) |
Uptime: | 101:43:47 |
Calls: | 8,363 |
Calls today: | 2 |
Files: | 13,165 |
Messages: | 5,898,006 |