diff --git a/README.md b/README.md index a23a4c05..b99908c1 100644 --- a/README.md +++ b/README.md @@ -226,7 +226,7 @@ The feature `evcxr` should be enabled when including Plotters to Jupyter Noteboo The following code shows a minimal example of this. ```text -:dep plotters = { version = "^0.3.6", default_features = false, features = ["evcxr", "all_series", "all_elements"] } +:dep plotters = { version = "^0.3.6", default-features = false, features = ["evcxr", "all_series", "all_elements"] } extern crate plotters; use plotters::prelude::*; @@ -504,7 +504,7 @@ plotters = { git = "https://github.com/plotters-rs/plotters.git" } ### Reducing Depending Libraries && Turning Off Backends Plotters now supports use features to control the backend dependencies. By default, `BitMapBackend` and `SVGBackend` are supported, -use `default_features = false` in the dependency description in `Cargo.toml` and you can cherry-pick the backend implementations. +use `default-features = false` in the dependency description in `Cargo.toml` and you can cherry-pick the backend implementations. - `svg` Enable the `SVGBackend` - `bitmap` Enable the `BitMapBackend` @@ -513,16 +513,16 @@ For example, the following dependency description would avoid compiling with bit ```toml [dependencies] -plotters = { git = "https://github.com/plotters-rs/plotters.git", default_features = false, features = ["svg"] } +plotters = { git = "https://github.com/plotters-rs/plotters.git", default-features = false, features = ["svg"] } ``` The library also allows consumers to make use of the [`Palette`](https://crates.io/crates/palette/) crate's color types by default. -This behavior can also be turned off by setting `default_features = false`. +This behavior can also be turned off by setting `default-features = false`. ### List of Features This is the full list of features that is defined by `Plotters` crate. -Use `default_features = false` to disable those default enabled features, +Use `default-features = false` to disable those default enabled features, and then you should be able to cherry-pick what features you want to include into `Plotters` crate. By doing so, you can minimize the number of dependencies down to only `itertools` and compile time is less than 6s. diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 5a6c9a7a..060e922a 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -54,13 +54,13 @@ Thus, if plotters is imported with default feature set, there would require no c should be make with your `Crates.toml`: ```toml -plotters = {version = "0.3", default_features = false, features = ["bitmap_backend", "svg_backend"]} # Instead of using feature "bitmap" and "svg" +plotters = {version = "0.3", default-features = false, features = ["bitmap_backend", "svg_backend"]} # Instead of using feature "bitmap" and "svg" ``` For non tier 1 backends, manmually import is required (Please note tier on backends can be imported in same way). For example: ```toml -plotters = {version = "0.3", default_features = false} # Instead of having features = ["cairo"] at this point +plotters = {version = "0.3", default-features = false} # Instead of having features = ["cairo"] at this point plotters-cairo = "0.3" # We should import the cairo backend in this way. ``` diff --git a/doc-template/readme.template.md b/doc-template/readme.template.md index e4f081e7..980be43e 100644 --- a/doc-template/readme.template.md +++ b/doc-template/readme.template.md @@ -69,7 +69,7 @@ The feature `evcxr` should be enabled when including Plotters to Jupyter Noteboo The following code shows a minimal example of this. ```text -:dep plotters = { git = "https://github.com/plotters-rs/plotters", default_features = false, features = ["evcxr"] } +:dep plotters = { git = "https://github.com/plotters-rs/plotters", default-features = false, features = ["evcxr"] } extern crate plotters; use plotters::prelude::*; @@ -242,7 +242,7 @@ plotters = { git = "https://github.com/plotters-rs/plotters.git" } ### Reducing Depending Libraries && Turning Off Backends Plotters now supports use features to control the backend dependencies. By default, `BitMapBackend` and `SVGBackend` are supported, -use `default_features = false` in the dependency description in `Cargo.toml` and you can cherry-pick the backend implementations. +use `default-features = false` in the dependency description in `Cargo.toml` and you can cherry-pick the backend implementations. - `svg` Enable the `SVGBackend` - `bitmap` Enable the `BitMapBackend` @@ -251,16 +251,16 @@ For example, the following dependency description would avoid compiling with bit ```toml [dependencies] -plotters = { git = "https://github.com/plotters-rs/plotters.git", default_features = false, features = ["svg"] } +plotters = { git = "https://github.com/plotters-rs/plotters.git", default-features = false, features = ["svg"] } ``` The library also allows consumers to make use of the [`Palette`](https://crates.io/crates/palette/) crate's color types by default. -This behavior can also be turned off by setting `default_features = false`. +This behavior can also be turned off by setting `default-features = false`. ### List of Features This is the full list of features that is defined by `Plotters` crate. -Use `default_features = false` to disable those default enabled features, +Use `default-features = false` to disable those default enabled features, and then you should be able to cherry-pick what features you want to include into `Plotters` crate. By doing so, you can minimize the number of dependencies down to only `itertools` and compile time is less than 6s. diff --git a/plotters-bitmap/Cargo.toml b/plotters-bitmap/Cargo.toml index 881e4051..d610a5a3 100644 --- a/plotters-bitmap/Cargo.toml +++ b/plotters-bitmap/Cargo.toml @@ -30,7 +30,7 @@ image_encoder = ["image"] gif_backend = ["gif", "image_encoder"] [dev-dependencies.plotters] -default_features = false +default-features = false features = ["ttf", "line_series", "bitmap_backend"] path = "../plotters" diff --git a/plotters-svg/Cargo.toml b/plotters-svg/Cargo.toml index 8e09d3ca..24e790ab 100644 --- a/plotters-svg/Cargo.toml +++ b/plotters-svg/Cargo.toml @@ -26,6 +26,6 @@ debug = [] bitmap_encoder = ["image"] [dev-dependencies.plotters] -default_features = false +default-features = false features = ["ttf"] path = "../plotters" diff --git a/plotters/Cargo.toml b/plotters/Cargo.toml index 2443a93a..0ba956c9 100644 --- a/plotters/Cargo.toml +++ b/plotters/Cargo.toml @@ -22,7 +22,7 @@ path = "../plotters-backend" [dependencies.plotters-bitmap] version = "0.3.6" -default_features = false +default-features = false optional = true path = "../plotters-bitmap" diff --git a/plotters/src/lib.rs b/plotters/src/lib.rs index 847261a8..8bcd4bfb 100644 --- a/plotters/src/lib.rs +++ b/plotters/src/lib.rs @@ -362,7 +362,7 @@ The feature `evcxr` should be enabled when including Plotters to Jupyter Noteboo The following code shows a minimal example of this. ```text -:dep plotters = { version = "^0.3.6", default_features = false, features = ["evcxr", "all_series", "all_elements"] } +:dep plotters = { version = "^0.3.6", default-features = false, features = ["evcxr", "all_series", "all_elements"] } extern crate plotters; use plotters::prelude::*; @@ -640,7 +640,7 @@ plotters = { git = "https://github.com/plotters-rs/plotters.git" } ### Reducing Depending Libraries && Turning Off Backends Plotters now supports use features to control the backend dependencies. By default, `BitMapBackend` and `SVGBackend` are supported, -use `default_features = false` in the dependency description in `Cargo.toml` and you can cherry-pick the backend implementations. +use `default-features = false` in the dependency description in `Cargo.toml` and you can cherry-pick the backend implementations. - `svg` Enable the `SVGBackend` - `bitmap` Enable the `BitMapBackend` @@ -649,16 +649,16 @@ For example, the following dependency description would avoid compiling with bit ```toml [dependencies] -plotters = { git = "https://github.com/plotters-rs/plotters.git", default_features = false, features = ["svg"] } +plotters = { git = "https://github.com/plotters-rs/plotters.git", default-features = false, features = ["svg"] } ``` The library also allows consumers to make use of the [`Palette`](https://crates.io/crates/palette/) crate's color types by default. -This behavior can also be turned off by setting `default_features = false`. +This behavior can also be turned off by setting `default-features = false`. ### List of Features This is the full list of features that is defined by `Plotters` crate. -Use `default_features = false` to disable those default enabled features, +Use `default-features = false` to disable those default enabled features, and then you should be able to cherry-pick what features you want to include into `Plotters` crate. By doing so, you can minimize the number of dependencies down to only `itertools` and compile time is less than 6s.