-
Notifications
You must be signed in to change notification settings - Fork 3
Description
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
fooand then publish subcratesfoo/barandfoo/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!