[package] authors = ["martin "] categories = ["graphics"] edition = "2021" description = "A port of D3/d3-geo" keywords = ["graphics", "d3-geo"] name = "d3_geo_rs" license = "MIT" readme = "../README.md" repository = "https://github.com/martinfrances107/rust_d3_geo.git" version = { workspace = true } [dependencies] approx = "~0.5" num-traits = "~0.2" geo = { workspace = true } geo-types = { workspace = true } wgpu = { version = "22", optional = true } bytemuck = { version = "1", optional = true, features = ["derive"] } [dev-dependencies] criterion = { version = "~0.5", features = ["html_reports"] } futures = { workspace = true } js-sys = { workspace = true } rand = { workspace = true } rayon = "1" rust_topojson_client = { workspace = true } wasm-bindgen = { workspace = true } wasm-bindgen-test = { workspace = true } wasm-bindgen-futures = { workspace = true } gloo-utils = { workspace = true } pretty_assertions = "1" regex = "1" serde_json = { workspace = true } topojson = { workspace = true } [features] default = ["web"] web = ["dep:web-sys"] wgpu = ["dep:wgpu", "dep:bytemuck"] # console_error_panic_hook: - is a development only feature!! # I want to refer to examples/globe/rotating_50m as an example that will show up in documentation. # ( as generated by 'cargo doc' ) console_error_panic_hook = [] [package.metadata.docs.rs] cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"] [lib] crate-type = ["cdylib", "rlib"] # There is a subtle point here... # # The feature list, is at first glance, expanded to # include things not needed to test the "lib" crate. # # This is because the [[examples]] below reach into other workspace # examples ( HtmlCollection is an example of this.) [dependencies.web-sys] workspace = true optional = true features = [ "Attr", "console", "CanvasRenderingContext2d", "Document", "Element", "Event", "Headers", "EventTarget", "HtmlCanvasElement", "HtmlCollection", "HtmlElement", "HtmlInputElement", "Node", "Path2d", "Performance", "PerformanceTiming", "PerformanceMeasure", "Request", "RequestInit", "RequestMode", "Response", "SvgsvgElement", "SvgAnimatedLength", "SvgLength", "SvgPathElement", "Text", "Window", ] [[bench]] name = "graticule" harness = false [[bench]] name = "rings" harness = false [[bench]] name = "transforms" harness = false [[example]] name = "globe_canvas" path = "../examples/globe/canvas/src/lib.rs" crate-type = ["cdylib"] [[example]] name = "globe_drag_and_zoom" path = "../examples/globe/drag_and_zoom/src/lib.rs" crate-type = ["cdylib"] [[example]] name = "rotating_50m" path = "../examples/globe/rotating_50m/src/lib.rs" crate-type = ["cdylib"] # I would like to include this as an documentable example but rust is restrictive # on this matter. # # Cargo is configured for the examples to be single file demonstrations # not stand alone crates. # # An example cannot have features flag unique to the binary. # All sub-dependencies unique to binary must be in the libraries dev-dependency list. # # [[example]] # name = "rotating_wgpu" # path = "../examples/globe/rotating_wgpu/src/main.rs" # bin = true [[example]] name = "globe_svg" path = "../examples/globe/svg/src/lib.rs" crate-type = ["cdylib"] [[example]] name = "projection" path = "../examples/projections/src/lib.rs" crate-type = ["cdylib"] [[example]] name = "rings" path = "../examples/ring/src/lib.rs" crate-type = ["cdylib"]