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

Prototype using / available for testing out! #10

Open
carols10cents opened this issue Dec 31, 2020 · 6 comments
Open

Prototype using / available for testing out! #10

carols10cents opened this issue Dec 31, 2020 · 6 comments

Comments

@carols10cents
Copy link

carols10cents commented Dec 31, 2020

TL;DR go to https://cratespaces.integer32.com/ and follow the instructions to try out crates-as-namespaces with / as the separator!

If you don't know what this is, check out the text of this draft RFC.

What was built

Thanks to @stephanbuys, @JWorthe, and @tshepang of Caeg Industries who built this prototype!

It consists of:

  • A fork of crates.io that accepts / as a crate name character to allow the creation of sub-crates in the same namespace. Owners of the top-level crate have permissions to publish the sub-crates and automatically get permissions to any sub-crate.
  • A fork of Cargo that recognizes / as a valid crate name character and converts it to _ for compilation purposes
  • Documentation and tests for this behavior

So you should be able to:

  • Publish a crate named foo and then publish subcrates foo/bar and foo/baz
  • Depend on crates at the top of a namespace and in a namespace

Notably, no changes to rustc are needed for this to work!

I'm managing the running crates.io forked instance -- please ping me if it needs to be cleared out or if it goes down or something.

What wasn't built

We deliberately did not implement support for Cargo features to try and resolve the ambiguous syntax issue; they won't work with this prototype 🤷‍♀️

The forked instance deliberately doesn't include the current crates.io database right now; we're ignoring migration paths for this experiment.

How to help

Please follow the instructions at https://cratespaces.integer32.com/ to try out this behavior and report if it does or does not work as you would expect, given your understanding of the RFC text.

Especially open new issues on this repo for any problems you encounter that we haven't considered yet! Please DO NOT open issues on crates.io's repo as we have not decided whether this is the functionality we want yet and it is definitely not supported for real!

@Manishearth
Copy link
Owner

This is amazing, thank you everyone who helped make this happen!!

@joshtriplett
Copy link

Incredible work! Thank you for putting this together.

@jmjoy
Copy link

jmjoy commented Apr 15, 2022

Will the following situation create a conflict?
foo/bar-baz
foo-bar/baz

@vi
Copy link

vi commented Jun 13, 2022

Started to try it, but the modified Cargo failed to build.

Maybe it's time to mark this namespacing-rfc (with Cargo and crates.io forks) as officially abandoned?

@Manishearth
Copy link
Owner

Why would it be abandoned? The RFC is open and active (rust-lang/rfcs#3243), I think currently the team needs to discuss it and come back with a verdict.

@SET001
Copy link

SET001 commented Nov 15, 2023

any news on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants