From 3cb28947f67ead21ecd265b8a9dcffaa38e6eb16 Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Tue, 7 Feb 2023 22:09:28 -0700 Subject: [PATCH] fix: exclude examples from crate crates.io is limited to 10MB crates Signed-off-by: Stephen Waits --- Cargo.toml | 5 ++++- README.md | 14 +++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 21dac67..8d08ae0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vivaldi-nc" -version = "0.4.0" +version = "0.4.1" edition = "2021" authors = ["Stephen Waits "] description = "Vivaldi network coordinates with a simple interface." @@ -11,6 +11,9 @@ documentation = "https://docs.rs/vivaldi-nc/" readme = "README.md" homepage = "https://sr.ht/~swaits/vivaldi-nc/" repository = "https://git.sr.ht/~swaits/vivaldi-nc" +exclude = [ + "examples/*", +] [dev-dependencies] assert_approx_eq = "1.1.0" diff --git a/README.md b/README.md index 19b410a..e079e7b 100644 --- a/README.md +++ b/README.md @@ -112,8 +112,9 @@ usage examples. ### Examples -Run an example which loads a n-to-n latency sample from PlanetLab and iterates -on `NetworkCoordinate`s until some low-enough mean error is reached. The output is a JSON array of elements that look like this: +The repository includes an example which loads a n-to-n latency sample from +PlanetLab and iterates on `NetworkCoordinate`s until some low-enough mean error +is reached. The output is a JSON array of elements that look like this: ```json { @@ -131,9 +132,16 @@ on `NetworkCoordinate`s until some low-enough mean error is reached. The output }, ``` -To run the example: +To run the example, first clone the repository locally: ```bash +git clone https://git.sr.ht/~swaits/vivaldi-nc +``` + +Then `cd` into the local clone and run the example: + +```bash +cd vivaldi-nc cargo run --example planetlab ```