Browse Source

Merge branch 'master' of git.jstrong.dev:jstrong/crate-index

master
Gitea 4 years ago
parent
commit
7b31ff6b0f
1 changed files with 11 additions and 1 deletions
  1. +11
    -1
      README.md

+ 11
- 1
README.md View File

@@ -11,13 +11,23 @@ This index (and, by extension, the [crates.jstrong.dev] registry) allows crates
How to use this index ? How to use this index ?
----------------------- -----------------------


If you want to use this index, you can follow these steps:
If you want to use a crate hosted at [crates.jstrong.dev]:


- Edit or create the `~/.cargo/config` file, and add the following code: - Edit or create the `~/.cargo/config` file, and add the following code:
```toml ```toml
[registries.jstrong-dev] [registries.jstrong-dev]
index = "https://git.jstrong.dev/jstrong/crate-index" index = "https://git.jstrong.dev/jstrong/crate-index"
``` ```
- In `Cargo.toml`, specify the crate's registry when declaring it as a dependency, e.g.:
```toml
[dependencies]
markets = { version = "0.3.0", registry = "jstrong-dev" }
```

If you also want to publish a crate to the registry:

- Register as a user at [crates.jstrong.dev]
- Configure `~/.cargo/config` with `registries.jstrong-dev` entry as described above
- Then, run `cargo login --registry jstrong-dev` and enter your author token. - Then, run `cargo login --registry jstrong-dev` and enter your author token.
- You can now use the registry using `cargo publish --registry jstrong-dev` or `cargo search --registry jstrong-dev` - You can now use the registry using `cargo publish --registry jstrong-dev` or `cargo search --registry jstrong-dev`




Loading…
Cancel
Save