Skip to content

Commit f801a1f

Browse files
committed
updated README
1 parent 0457e79 commit f801a1f

File tree

1 file changed

+29
-26
lines changed

1 file changed

+29
-26
lines changed

README.md

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
<a href="https://github.com/bytecodealliance/registry/actions?query=workflow%3ACI"><img src="https://github.com/bytecodealliance/registry/workflows/Rust/badge.svg" alt="build status" /></a>
1212
<a href="https://crates.io/crates/warg-cli"><img src="https://img.shields.io/crates/v/warg-cli.svg?style=flat-square" alt="Crates.io version" /></a>
1313
<a href="https://crates.io/crates/warg-cli"><img src="https://img.shields.io/crates/d/warg-cli.svg?style=flat-square" alt="Download" /></a>
14-
<a href="https://bytecodealliance.github.io/warg-cli/"><img src="https://img.shields.io/badge/docs-latest-blue.svg?style=flat-square" alt="docs.rs docs" /></a>
14+
<a href="https://docs.rs/warg-client/latest/warg_client/"><img src="https://img.shields.io/badge/docs-latest-blue.svg?style=flat-square" alt="docs.rs docs" /></a>
1515
</p>
1616
</div>
1717

1818
## Overview
1919

20-
This repository contains the reference implementation of the Warg protocol, a client,
20+
This repository contains the reference implementation of the Warg protocol, a client library,
2121
server, and CLI.
2222

2323
A Warg client and server can be used to distribute WebAssembly components to
@@ -27,21 +27,20 @@ See the [introduction](docs/README.md) for the design decisions and scope.
2727

2828
## Prerequisites
2929

30-
- The latest [stable Rust](https://www.rust-lang.org/tools/install).
30+
- Install the latest [stable Rust](https://www.rust-lang.org/tools/install).
3131

3232
## Installation
3333

34-
To install `warg`, first you'll want to install
35-
[the latest stable Rust](https://www.rust-lang.org/tools/install) and then
36-
you'll execute to install the subcommand:
34+
To install or upgrade the `warg` CLI:
35+
```
36+
cargo install warg-cli
37+
```
3738

39+
To install or upgrade the `warg` reference implmentation server:
3840
```
39-
cargo install --git https://github.com/bytecodealliance/registry
41+
cargo install warg-server
4042
```
4143

42-
The [currently published crate](https://crates.io/crates/warg-cli)
43-
on crates.io is a nonfunctional placeholder and these instructions will be
44-
updated to install the crates.io package once a proper release is made.
4544

4645
## Getting Started
4746

@@ -156,22 +155,12 @@ warg publish revoke --name example:hello sha256:abc...
156155

157156
### Resetting and clearing local data
158157

159-
To reset local data for the home registry:
158+
To reset local package log data for registries:
160159
```
161160
warg reset
162161
```
163162

164-
To reset local data for a specific registry, such as `registry.example.com`:
165-
```
166-
warg reset --registry registry.example.com
167-
```
168-
169-
To reset local data for all registries:
170-
```
171-
warg reset --all
172-
```
173-
174-
To clear local content for all registries:
163+
To clear downloaded package content for all registries:
175164
```
176165
warg clear
177166
```
@@ -193,15 +182,29 @@ git clone https://github.com/bytecodealliance/registry
193182

194183
### Testing Changes
195184

196-
Ideally, there should be tests written for all changes. Test can be run via:
185+
Ideally, there should be tests written for all changes.
186+
187+
Run the tests of the in-memory implementation of the `warg-server`:
188+
189+
```
190+
cargo test --workspace
191+
```
192+
193+
Run the tests of the Postgres implementation of the `warg-server`:
197194

198195
```
199-
cargo test --all
196+
docker run -d --name postgres-test -e POSTGRES_PASSWORD=password -p 5433:5432 postgres
197+
diesel database setup --database-url postgres://postgres:password@localhost:5433/test-registry --migration-dir crates/server/src/datastore/postgres/migrations
198+
WARG_DATABASE_URL=postgres://postgres:password@localhost:5433/test-registry cargo test --features postgres -- --nocapture
200199
```
201200

202-
### Testing with Containers
201+
You may need to install [Docker](https://www.docker.com/get-started/) and the
202+
[Diesel CLI](https://diesel.rs/guides/getting-started) first with the Postgres feature.
203+
204+
```
205+
cargo install diesel_cli --no-default-features --features postgres
206+
```
203207

204-
See the [local infra documentation](infra/local/README.md) on how to develop and test with locally running containers.
205208

206209
### Submitting Changes
207210

0 commit comments

Comments
 (0)