[package] name = "intvg" version = "0.1.7" edition = "2021" default-run = "intvg" license = "MIT OR Apache-2.0" authors = [ "MeiHui FAN " ] repository = "https://github.com/mhfan/intvg" description = "lib/tool in Rust to load/save/render tvg file, parse from svg file by usvg" categories = [ "parser-implementations", "rendering::data-formats", "rendering::engine", "graphics", "multimedia::images" ] # https://crates.io/category_slugs keywords = [ "TinyVG", "SVG", "vector-graphic", "EVG", "Blend2D" ] #exclude = [ "examples" ] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] #byteorder = "1.4" # use ::(from/to)_le_bytes instead #tiny-skia-path = "0.11" tiny-skia = "0.11" kurbo = "0.11" # Bezier curves utils usvg = "0.42" #build-time = { version = "0.1", git = "https://github.com/AlephAlpha/build-time" } png = { version = "0.17", optional = true } winit = { version = "0.29", optional = true } femtovg = { version = "0.9", optional = true } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] glutin = { version = "0.31", optional = true } # offscreen@v0.29 glutin-winit = { version = "0.4", optional = true } raw-window-handle = { version = "0.5", optional = true } # HasRawWindowHandle [target.'cfg(target_arch = "wasm32")'.dependencies] web_sys = { version = "0.3", package = "web-sys", features = [ "console", "WebGlContextAttributes", ] } [lib] # Disable doctests as a workaround for https://github.com/rust-lang/rust-bindgen/issues/1313 #doctest = false [features] ovg = [] ugl = [] b2d = [] b2d_sfp = [ "b2d" ] ftg = [] evg_fixed = [ "evg" ] # quite slow than floating point on Apple M1 evg = [ "dep:png" ] nvg = [ "femtovg", "winit", "glutin", "glutin-winit", "raw-window-handle" ] #cc = [ "dep:cc", "dep:bindgen", "dep:glob" ] # implied by optional dependency #default = [ "b2d", "evg", "nvg" ] # XXX: ftg/ovg/ugl not completely work yet [[bin]] name = "nanovg" path = "src/nanovg.rs" required-features = [ "nvg" ] [[bench]] name = "engine_2d" harness = false [dev-dependencies] criterion = "0.5" #rexpect = "0.5" [build-dependencies] cc = { version = "1.0", features = [ "parallel" ] } bindgen = "0.69" chrono = "0.4" glob = "0.3" #walkdir = "2.4" [profile.dev] opt-level = 1 # Enable a small amount of optimization in debug mode [profile.dev.package."*"] # For any non-workspace member (all dependencies) strip = 'debuginfo' codegen-units = 1 opt-level = 3 [profile.release] codegen-units = 1 strip = 'debuginfo' panic = 'abort' #opt-level = 3 # default level lto = 'fat' # true [workspace] #members = [ "wcnvs" ]