Skip to content

Commit 353faf5

Browse files
authored
Merge pull request rust-lang#31 from killercup/patch-1
Readme: Condense install section, default usage
2 parents c311a85 + b101563 commit 353faf5

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

README.md

+25-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# rust-semverver
2+
23
[![Build Status](https://travis-ci.org/ibabushkin/rust-semverver.svg?branch=master)](https://travis-ci.org/ibabushkin/rust-semverver)
34

45
This repository is hosting a proof-of-concept implementation of an automatic tool checking
@@ -11,6 +12,7 @@ Details on the work done during GSoC 2017 can be found
1112
[here](https://github.com/ibabushkin/rust-semverver/blob/master/doc/gsoc.md).
1213

1314
## Background
15+
1416
The approach taken is to compile both versions of the crate to `rlib`s and to link them as
1517
dependencies of a third, empty, dummy crate. Then, a custom compiler driver is run on the
1618
said dummy and all necessary analysis is performed in that context, where type information
@@ -20,8 +22,22 @@ More information on the inner workings of the tool can be found
2022
[here](https://github.com/ibabushkin/rust-semverver/blob/master/doc/impl_notes.md).
2123

2224
## Installation
25+
2326
The tool is implemented as a cargo plugin. As of now, it can be obtained from this git
24-
repository and compiled from source, provided you have a recent Rust nightly installed:
27+
repository and compiled from source.
28+
29+
If you are already using Rust nightly and have successfully installed tools like
30+
`cargo add` and `cargo clippy`, just do:
31+
32+
```sh
33+
$ cargo install --git https://github.com/ibabushkin/rust-semverver
34+
```
35+
36+
<details>
37+
38+
<summary>
39+
Manual installation and more details
40+
</summary>
2541

2642
```sh
2743
# using rustup is recommended
@@ -44,7 +60,14 @@ PATH=/path/to/repo/target/debug:$PATH cargo semver <args>
4460
If you have built using `cargo build --release` instead, change the path to point to the
4561
`release` subdirectory of the `target` directory.
4662

63+
</details>
64+
4765
## Usage
66+
67+
By default, running `cargo semver` in directory with a Cargo project will try to compare
68+
the local version the one last published on crates.io, and display warning or errors for
69+
all breaking changes found.
70+
4871
Invoking `cargo semver -h` gives you the latest help message, which outlines how to use
4972
the cargo plugin:
5073

@@ -70,6 +93,7 @@ This means that you can compare any two crates' specified versions, as long as t
7093
available on crates.io or present on your filesystem.
7194

7295
## Functionality
96+
7397
The guideline used to implement semver compatibility is the [API evolution
7498
RFC](https://github.com/rust-lang/rfcs/blob/master/text/1105-api-evolution.md), which
7599
applies the principles of semantic versioning to the Rust language's semantics. According

0 commit comments

Comments
 (0)