Manully Download Crate from crates.io

Ah, I think it might actually be fine, but there was a subtle edge case in how Cargo deals with crates with features that enable features of thier dev-dependencies. I've made some changes to Margo to address that, which should be available if you grab version 0.1.5. With those changes, I did the same process as before:

  1. Create a new repo
  2. Add a crate to it with cargo add (I chose serde_json)
  3. Set an alternate CARGO_HOME directory
  4. Run cargo fetch
  5. Get the crates from the alternate CARGO_HOME and add them to a Margo registry.

Then I set up my usage crate with a .cargo/config.toml to use Margo instead of crates.io:

[registries]
my-awesome-registry = { index = "sparse+http://[::1]:9999/" }

[source.crates-io]
replace-with = "my-awesome-registry"

With that, I was able to build:

% cargo build
    Updating `my-awesome-registry` index
  Downloaded itoa v1.0.11 (registry `my-awesome-registry`)
  Downloaded memchr v2.7.4 (registry `my-awesome-registry`)
  Downloaded ryu v1.0.18 (registry `my-awesome-registry`)
  Downloaded serde v1.0.209 (registry `my-awesome-registry`)
  Downloaded serde_json v1.0.127 (registry `my-awesome-registry`)