1
1
# rust-semverver
2
+
2
3
[ ![ Build Status] ( https://travis-ci.org/ibabushkin/rust-semverver.svg?branch=master )] ( https://travis-ci.org/ibabushkin/rust-semverver )
3
4
4
5
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
11
12
[ here] ( https://github.com/ibabushkin/rust-semverver/blob/master/doc/gsoc.md ) .
12
13
13
14
## Background
15
+
14
16
The approach taken is to compile both versions of the crate to ` rlib ` s and to link them as
15
17
dependencies of a third, empty, dummy crate. Then, a custom compiler driver is run on the
16
18
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
20
22
[ here] ( https://github.com/ibabushkin/rust-semverver/blob/master/doc/impl_notes.md ) .
21
23
22
24
## Installation
25
+
23
26
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 >
25
41
26
42
``` sh
27
43
# using rustup is recommended
@@ -44,7 +60,14 @@ PATH=/path/to/repo/target/debug:$PATH cargo semver <args>
44
60
If you have built using ` cargo build --release ` instead, change the path to point to the
45
61
` release ` subdirectory of the ` target ` directory.
46
62
63
+ </details >
64
+
47
65
## 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
+
48
71
Invoking ` cargo semver -h ` gives you the latest help message, which outlines how to use
49
72
the cargo plugin:
50
73
@@ -70,6 +93,7 @@ This means that you can compare any two crates' specified versions, as long as t
70
93
available on crates.io or present on your filesystem.
71
94
72
95
## Functionality
96
+
73
97
The guideline used to implement semver compatibility is the [ API evolution
74
98
RFC] ( https://github.com/rust-lang/rfcs/blob/master/text/1105-api-evolution.md ) , which
75
99
applies the principles of semantic versioning to the Rust language's semantics. According
0 commit comments