|
1 |
| -[workspace] |
2 |
| -members = ["plotters", "plotters-backend", "plotters-bitmap", "plotters-svg"] |
3 |
| -default-members = ["plotters"] |
| 1 | +[package] |
| 2 | +name = "plotters" |
| 3 | +version = "0.3.1" |
| 4 | +authors = [ "Hao Hou <[email protected]>"] |
| 5 | +edition = "2021" |
| 6 | +license = "MIT" |
| 7 | +description = "A Rust drawing library focus on data plotting for both WASM and native applications" |
| 8 | +repository = "https://github.com/38/plotters" |
| 9 | +homepage = "https://plotters-rs.github.io/" |
| 10 | +keywords = ["WebAssembly", "Visualization", "Plotting", "Drawing"] |
| 11 | +categories = ["visualization", "wasm"] |
| 12 | +readme = "README.md" |
| 13 | +exclude = ["doc-template", "plotters-doc-data"] |
4 | 14 |
|
| 15 | +[dependencies] |
| 16 | +num-traits = "0.2.14" |
| 17 | +chrono = { version = "0.4.19", optional = true } |
| 18 | + |
| 19 | +[dependencies.plotters-backend] |
| 20 | +path = "../plotters-backend" |
| 21 | + |
| 22 | +[dependencies.plotters-bitmap] |
| 23 | +default_features = false |
| 24 | +path = "../plotters-bitmap" |
| 25 | +optional = true |
| 26 | + |
| 27 | +[dependencies.plotters-svg] |
| 28 | +path = "../plotters-svg" |
| 29 | +optional = true |
| 30 | + |
| 31 | +[target.'cfg(not(target_arch = "wasm32"))'.dependencies] |
| 32 | +ttf-parser = { version = "0.15.0", optional = true } |
| 33 | +lazy_static = { version = "1.4.0", optional = true } |
| 34 | +pathfinder_geometry = { version = "0.5.1", optional = true } |
| 35 | +font-kit = { version = "0.11.0", optional = true } |
| 36 | + |
| 37 | +[target.'cfg(not(target_arch = "wasm32"))'.dependencies.image] |
| 38 | +version = "0.24.2" |
| 39 | +optional = true |
| 40 | +default-features = false |
| 41 | +features = ["jpeg", "png", "bmp"] |
| 42 | + |
| 43 | +[target.'cfg(target_arch = "wasm32")'.dependencies.wasm-bindgen] |
| 44 | +version = "0.2.62" |
| 45 | + |
| 46 | +[target.'cfg(target_arch = "wasm32")'.dependencies.web-sys] |
| 47 | +version = "0.3.51" |
| 48 | +features = [ |
| 49 | + "Document", |
| 50 | + "DomRect", |
| 51 | + "Element", |
| 52 | + "HtmlElement", |
| 53 | + "Node", |
| 54 | + "Window", |
| 55 | + "HtmlCanvasElement", |
| 56 | + "CanvasRenderingContext2d", |
| 57 | +] |
| 58 | + |
| 59 | +[features] |
| 60 | +default = [ |
| 61 | + "bitmap_backend", "bitmap_encoder", "bitmap_gif", |
| 62 | + "svg_backend", |
| 63 | + "chrono", |
| 64 | + "ttf", |
| 65 | + "image", |
| 66 | + "deprecated_items", "all_series", "all_elements", |
| 67 | + "full_palette" |
| 68 | +] |
| 69 | +all_series = ["area_series", "line_series", "point_series", "surface_series"] |
| 70 | +all_elements = ["errorbar", "candlestick", "boxplot", "histogram"] |
| 71 | + |
| 72 | +# Tier 1 Backends |
| 73 | +bitmap_backend = ["plotters-bitmap", "ttf"] |
| 74 | +bitmap_encoder = ["plotters-bitmap/image_encoder"] |
| 75 | +bitmap_gif = ["plotters-bitmap/gif_backend"] |
| 76 | +svg_backend = ["plotters-svg"] |
| 77 | + |
| 78 | +# Colors |
| 79 | +full_palette = [] |
| 80 | + |
| 81 | +# Elements |
| 82 | +errorbar = [] |
| 83 | +candlestick = [] |
| 84 | +boxplot = [] |
| 85 | + |
| 86 | +# Series |
| 87 | +histogram = [] |
| 88 | +area_series = [] |
| 89 | +line_series = [] |
| 90 | +point_series = [] |
| 91 | +surface_series = [] |
| 92 | + |
| 93 | +# Font implementation |
| 94 | +ttf = ["font-kit", "ttf-parser", "lazy_static", "pathfinder_geometry"] |
| 95 | +# dlopen fontconfig C library at runtime instead of linking at build time |
| 96 | +# Can be useful for cross compiling, especially considering fontconfig has lots of C dependencies |
| 97 | +fontconfig-dlopen = ["font-kit/source-fontconfig-dlopen"] |
| 98 | + |
| 99 | +# Misc |
| 100 | +datetime = ["chrono"] |
| 101 | +evcxr = ["svg_backend"] |
| 102 | +deprecated_items = [] # Keep some of the deprecated items for backward compatibility |
| 103 | + |
| 104 | +[dev-dependencies] |
| 105 | +itertools = "0.10.0" |
| 106 | +criterion = "0.3.4" |
| 107 | +rayon = "1.5.1" |
| 108 | +serde_json = "1.0.64" |
| 109 | +serde = "1.0.126" |
| 110 | +serde_derive = "1.0.126" |
| 111 | + |
| 112 | +[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies] |
| 113 | +rand = "0.8.3" |
| 114 | +rand_distr = "0.4.0" |
| 115 | +rand_xorshift = "0.3.0" |
| 116 | + |
| 117 | +[target.'cfg(target_arch = "wasm32")'.dev-dependencies] |
| 118 | +wasm-bindgen-test = "0.3.24" |
| 119 | + |
| 120 | +[[bench]] |
| 121 | +name = "benchmark" |
| 122 | +harness = false |
| 123 | +path = "benches/main.rs" |
0 commit comments