1 | [package] |
2 | name = "plotters" |
3 | version = "0.3.7" |
4 | authors = ["Hao Hou <haohou302@gmail.com>" ] |
5 | edition = "2018" |
6 | license = "MIT" |
7 | msrv = "1.56" |
8 | description = "A Rust drawing library focus on data plotting for both WASM and native applications" |
9 | repository = "https://github.com/plotters-rs/plotters" |
10 | homepage = "https://plotters-rs.github.io/" |
11 | keywords = ["WebAssembly" , "Visualization" , "Plotting" , "Drawing" ] |
12 | categories = ["visualization" , "wasm" ] |
13 | readme = "../README.md" |
14 | exclude = ["doc-template" , "plotters-doc-data" ] |
15 | |
16 | [lints.rust] |
17 | unexpected_cfgs = { level = "warn" , check-cfg = ['cfg(doc_cfg)' ] } |
18 | deprecated = { level = "allow" } |
19 | |
20 | [dependencies] |
21 | num-traits = "0.2.14" |
22 | chrono = { version = "0.4.32" , optional = true } |
23 | |
24 | [dependencies.plotters-backend] |
25 | version = "0.3.6" |
26 | path = "../plotters-backend" |
27 | |
28 | [dependencies.plotters-bitmap] |
29 | version = "0.3.6" |
30 | default-features = false |
31 | optional = true |
32 | path = "../plotters-bitmap" |
33 | |
34 | [dependencies.plotters-svg] |
35 | version = "0.3.6" |
36 | optional = true |
37 | path = "../plotters-svg" |
38 | |
39 | [target.'cfg(not(all(target_arch = "wasm32", not(target_os = "wasi"))))'.dependencies] |
40 | ttf-parser = { version = "0.20.0" , optional = true } |
41 | lazy_static = { version = "1.4.0" , optional = true } |
42 | pathfinder_geometry = { version = "0.5.1" , optional = true } |
43 | font-kit = { version = "0.14.2" , optional = true } |
44 | ab_glyph = { version = "0.2.12" , optional = true } |
45 | once_cell = { version = "1.8.0" , optional = true } |
46 | |
47 | |
48 | [target.'cfg(not(all(target_arch = "wasm32", not(target_os = "wasi"))))'.dependencies.image] |
49 | version = "0.24.3" |
50 | optional = true |
51 | default-features = false |
52 | features = ["jpeg" , "png" , "bmp" ] |
53 | |
54 | [target.'cfg(all(target_arch = "wasm32", not(target_os = "wasi")))'.dependencies.wasm-bindgen] |
55 | version = "0.2.89" |
56 | |
57 | [target.'cfg(all(target_arch = "wasm32", not(target_os = "wasi")))'.dependencies.web-sys] |
58 | version = "0.3.66" |
59 | features = [ |
60 | "Document" , |
61 | "DomRect" , |
62 | "Element" , |
63 | "HtmlElement" , |
64 | "Node" , |
65 | "Window" , |
66 | "HtmlCanvasElement" , |
67 | "CanvasRenderingContext2d" , |
68 | ] |
69 | |
70 | [features] |
71 | default = [ |
72 | "bitmap_backend" , "bitmap_encoder" , "bitmap_gif" , |
73 | "svg_backend" , |
74 | "chrono" , |
75 | "ttf" , |
76 | "image" , |
77 | "deprecated_items" , "all_series" , "all_elements" , |
78 | "full_palette" , |
79 | "colormaps" |
80 | ] |
81 | all_series = ["area_series" , "line_series" , "point_series" , "surface_series" ] |
82 | all_elements = ["errorbar" , "candlestick" , "boxplot" , "histogram" ] |
83 | |
84 | # Tier 1 Backends |
85 | bitmap_backend = ["plotters-bitmap" ] |
86 | bitmap_encoder = ["plotters-bitmap/image_encoder" ] |
87 | bitmap_gif = ["plotters-bitmap/gif_backend" ] |
88 | svg_backend = ["plotters-svg" ] |
89 | |
90 | # Colors |
91 | full_palette = [] |
92 | colormaps = [] |
93 | |
94 | # Elements |
95 | errorbar = [] |
96 | candlestick = [] |
97 | boxplot = [] |
98 | |
99 | # Series |
100 | histogram = [] |
101 | area_series = [] |
102 | line_series = [] |
103 | point_series = [] |
104 | surface_series = [] |
105 | |
106 | # Font implementation |
107 | ttf = ["font-kit" , "ttf-parser" , "lazy_static" , "pathfinder_geometry" ] |
108 | # dlopen fontconfig C library at runtime instead of linking at build time |
109 | # Can be useful for cross compiling, especially considering fontconfig has lots of C dependencies |
110 | fontconfig-dlopen = ["font-kit/source-fontconfig-dlopen" ] |
111 | |
112 | ab_glyph = ["dep:ab_glyph" , "once_cell" ] |
113 | |
114 | # Misc |
115 | datetime = ["chrono" ] |
116 | evcxr = ["svg_backend" ] |
117 | evcxr_bitmap = ["evcxr" , "bitmap_backend" , "plotters-svg/bitmap_encoder" ] |
118 | deprecated_items = [] # Keep some of the deprecated items for backward compatibility |
119 | |
120 | [dev-dependencies] |
121 | itertools = "0.10.0" |
122 | criterion = "0.5.1" |
123 | rayon = "1.5.1" |
124 | serde_json = "1.0.82" |
125 | serde = "1.0.139" |
126 | serde_derive = "1.0.140" |
127 | |
128 | [target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies] |
129 | rand = "0.8.3" |
130 | rand_distr = "0.4.0" |
131 | rand_xorshift = "0.3.0" |
132 | |
133 | [target.'cfg(all(target_arch = "wasm32", not(target_os = "wasi")))'.dev-dependencies] |
134 | wasm-bindgen-test = "0.3.39" |
135 | |
136 | [[bench]] |
137 | name = "benchmark" |
138 | harness = false |
139 | path = "benches/main.rs" |
140 | |
141 | [package.metadata.docs.rs] |
142 | all-features = true |
143 | rustdoc-args = ["--cfg" , "doc_cfg" ] |
144 | |
145 | |