Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Official" crates #934

Closed
steveklabnik opened this issue Nov 20, 2014 · 7 comments
Closed

"Official" crates #934

steveklabnik opened this issue Nov 20, 2014 · 7 comments
Labels
A-features Area: features — conditional compilation

Comments

@steveklabnik
Copy link
Member

It'd be cool if crates.io had some sort of "Official" badge. This would be useful in two ways:

  1. The "blessed" crates that come from the Rust developers itself.
  2. Things like "Github's official GitHub library" vs somebody else's.
@alexcrichton
Copy link
Member

I'm not quite sure how to go about doing this. I very much like the community focus of crates.io, and I don't want to bless "official crates" too much as there should in theory also be a set of "iron project blessed" crates etc. Decisions, decisions...

@reem
Copy link

reem commented Nov 21, 2014

I've also been thinking about this when deciding how to publish all of irons "official" middleware etc.

We could just add project "groups" similar to GitHub organizations that just create a namespace and list of common owners, and whose projects can be accessed as <org>/<project> in the dependencies section.

That way I could publish iron as "iron", then router as "iron/router" but still have the crate called router. This also avoids the annoying extern crate "iron-x" as x.

@erickt
Copy link
Contributor

erickt commented Nov 21, 2014

I am in favor of Reem's idea. It gives us a nice way to namespace projects.

On Friday, November 21, 2014, Jonathan Reem notifications@github.com
wrote:

I've also been thinking about this when deciding how to publish all of
irons "official" middleware etc.

We could just add project "groups", similar to GitHub organizations that
just create a namespace, list of common owners, and whose projects can be
accessed as "/" in the dependencies section.

That way I could publish iron as "iron", then router as "iron/router" but
still have the crate called router. This also avoids the annoying extern
crate "iron-x" as x.


Reply to this email directly or view it on GitHub
#934 (comment).

@tomjakubowski
Copy link
Contributor

Namespacing (via groups) is very very nice to have with Leiningen/Clojars, and I'd miss it if cargo/crates.io didn't have it too.

@reem a package stored in crates.io as iron/router would have a [lib] name of router right? So it would be linked like extern crate router?

@reem
Copy link

reem commented Nov 21, 2014

Yes. It's possible that Cargo would have to add a way to alias the crate name of dependencies to deal with conflicts, but I sincerely doubt it will be a major issue.

@yazaddaruvala
Copy link

@steveklabnik I would actually really like to see a blessed mode in conjunction with unsafe = true.

Any crate that uses unsafe explicitly in their code, should require the Cargo importer to use unsafe = true in their Cargo.toml

Example (if color used unsafe code):

[dependencies.color]

git = "https://github.com/bjz/color-rs.git"
unsafe = true

Unless, color is marked as blessed by crates.io. Then importers don't need to consider it unsafe, during use.

You can image the stdlib is the most blessed of all. Maybe in the future mio, or iron would be blessed, but until then as a Cargo user you should know you're using some random person's unsafe code, and be forced to condone it.

@steveklabnik steveklabnik added the A-features Area: features — conditional compilation label Jul 27, 2015
@alexcrichton
Copy link
Member

I believe this is basically done via the nursery + rust-lang organization, so I'm gonna close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-features Area: features — conditional compilation
Projects
None yet
Development

No branches or pull requests

6 participants