[package] name = "serde_arrow" version = "0.12.2" authors = ["Christopher Prohm "] edition = "2021" description = "Convert sequences of Rust objects to Arrow arrays and back again" readme = "../Readme.md" repository = "https://github.com/chmp/serde_arrow" license = "MIT" rust-version = "1.70.0" [lib] bench = false [[bench]] name = "serde_arrow_bench" # arrow-version:replace: required-features = ["arrow2-0-17", "arrow-{version}"] required-features = ["arrow2-0-17", "arrow-53"] harness = false [package.metadata.docs.rs] # arrow-version:replace: features = ["arrow2-0-17", "arrow-{version}"] features = ["arrow2-0-17", "arrow-53"] [features] default = [] # arrow-version:insert: arrow-{version} = ["dep:arrow-array-{version}", "dep:arrow-schema-{version}", "dep:arrow-data-{version}", "dep:arrow-buffer-{version}"] arrow-53 = ["dep:arrow-array-53", "dep:arrow-schema-53", "dep:arrow-data-53", "dep:arrow-buffer-53"] arrow-52 = ["dep:arrow-array-52", "dep:arrow-schema-52", "dep:arrow-data-52", "dep:arrow-buffer-52"] arrow-51 = ["dep:arrow-array-51", "dep:arrow-schema-51", "dep:arrow-data-51", "dep:arrow-buffer-51"] arrow-50 = ["dep:arrow-array-50", "dep:arrow-schema-50", "dep:arrow-data-50", "dep:arrow-buffer-50"] arrow-49 = ["dep:arrow-array-49", "dep:arrow-schema-49", "dep:arrow-data-49", "dep:arrow-buffer-49"] arrow-48 = ["dep:arrow-array-48", "dep:arrow-schema-48", "dep:arrow-data-48", "dep:arrow-buffer-48"] arrow-47 = ["dep:arrow-array-47", "dep:arrow-schema-47", "dep:arrow-data-47", "dep:arrow-buffer-47"] arrow-46 = ["dep:arrow-array-46", "dep:arrow-schema-46", "dep:arrow-data-46", "dep:arrow-buffer-46"] arrow-45 = ["dep:arrow-array-45", "dep:arrow-schema-45", "dep:arrow-data-45", "dep:arrow-buffer-45"] arrow-44 = ["dep:arrow-array-44", "dep:arrow-schema-44", "dep:arrow-data-44", "dep:arrow-buffer-44"] arrow-43 = ["dep:arrow-array-43", "dep:arrow-schema-43", "dep:arrow-data-43", "dep:arrow-buffer-43"] arrow-42 = ["dep:arrow-array-42", "dep:arrow-schema-42", "dep:arrow-data-42", "dep:arrow-buffer-42"] arrow-41 = ["dep:arrow-array-41", "dep:arrow-schema-41", "dep:arrow-data-41", "dep:arrow-buffer-41"] arrow-40 = ["dep:arrow-array-40", "dep:arrow-schema-40", "dep:arrow-data-40", "dep:arrow-buffer-40"] arrow-39 = ["dep:arrow-array-39", "dep:arrow-schema-39", "dep:arrow-data-39", "dep:arrow-buffer-39"] arrow-38 = ["dep:arrow-array-38", "dep:arrow-schema-38", "dep:arrow-data-38", "dep:arrow-buffer-38"] arrow-37 = ["dep:arrow-array-37", "dep:arrow-schema-37", "dep:arrow-data-37", "dep:arrow-buffer-37"] [dependencies] bytemuck = { version = "1", default-features = false } # TODO: make optional, only required for str -> date conversions chrono = { version = "0.4", features = ["std"], default-features = false } half = { version = "2", features = ["bytemuck"], default-features = false } serde = { version = "1.0", features = ["derive", "std"], default-features = false } # arrow-version:insert: arrow-array-{version} = {{ package = "arrow-array", version = "{version}", optional = true, default-features = false }} arrow-array-53 = { package = "arrow-array", version = "53", optional = true, default-features = false } arrow-array-52 = { package = "arrow-array", version = "52", optional = true, default-features = false } arrow-array-51 = { package = "arrow-array", version = "51", optional = true, default-features = false } arrow-array-50 = { package = "arrow-array", version = "50", optional = true, default-features = false } arrow-array-49 = { package = "arrow-array", version = "49", optional = true, default-features = false } arrow-array-48 = { package = "arrow-array", version = "48", optional = true, default-features = false } arrow-array-47 = { package = "arrow-array", version = "47", optional = true, default-features = false } arrow-array-46 = { package = "arrow-array", version = "46", optional = true, default-features = false } arrow-array-45 = { package = "arrow-array", version = "45", optional = true, default-features = false } arrow-array-44 = { package = "arrow-array", version = "44", optional = true, default-features = false } arrow-array-43 = { package = "arrow-array", version = "43", optional = true, default-features = false } arrow-array-42 = { package = "arrow-array", version = "42", optional = true, default-features = false } arrow-array-41 = { package = "arrow-array", version = "41", optional = true, default-features = false } arrow-array-40 = { package = "arrow-array", version = "40", optional = true, default-features = false } arrow-array-39 = { package = "arrow-array", version = "39", optional = true, default-features = false } arrow-array-38 = { package = "arrow-array", version = "38", optional = true, default-features = false } arrow-array-37 = { package = "arrow-array", version = "37", optional = true, default-features = false } # arrow-version:insert: arrow-buffer-{version} = {{ package = "arrow-buffer", version = "{version}", optional = true, default-features = false }} arrow-buffer-53 = { package = "arrow-buffer", version = "53", optional = true, default-features = false } arrow-buffer-52 = { package = "arrow-buffer", version = "52", optional = true, default-features = false } arrow-buffer-51 = { package = "arrow-buffer", version = "51", optional = true, default-features = false } arrow-buffer-50 = { package = "arrow-buffer", version = "50", optional = true, default-features = false } arrow-buffer-49 = { package = "arrow-buffer", version = "49", optional = true, default-features = false } arrow-buffer-48 = { package = "arrow-buffer", version = "48", optional = true, default-features = false } arrow-buffer-47 = { package = "arrow-buffer", version = "47", optional = true, default-features = false } arrow-buffer-46 = { package = "arrow-buffer", version = "46", optional = true, default-features = false } arrow-buffer-45 = { package = "arrow-buffer", version = "45", optional = true, default-features = false } arrow-buffer-44 = { package = "arrow-buffer", version = "44", optional = true, default-features = false } arrow-buffer-43 = { package = "arrow-buffer", version = "43", optional = true, default-features = false } arrow-buffer-42 = { package = "arrow-buffer", version = "42", optional = true, default-features = false } arrow-buffer-41 = { package = "arrow-buffer", version = "41", optional = true, default-features = false } arrow-buffer-40 = { package = "arrow-buffer", version = "40", optional = true, default-features = false } arrow-buffer-39 = { package = "arrow-buffer", version = "39", optional = true, default-features = false } arrow-buffer-38 = { package = "arrow-buffer", version = "38", optional = true, default-features = false } arrow-buffer-37 = { package = "arrow-buffer", version = "37", optional = true, default-features = false } # arrow-version:insert: arrow-data-{version} = {{ package = "arrow-data", version="{version}", optional = true, default-features = false }} arrow-data-53 = { package = "arrow-data", version="53", optional = true, default-features = false } arrow-data-52 = { package = "arrow-data", version="52", optional = true, default-features = false } arrow-data-51 = { package = "arrow-data", version="51", optional = true, default-features = false } arrow-data-50 = { package = "arrow-data", version="50", optional = true, default-features = false } arrow-data-49 = { package = "arrow-data", version="49", optional = true, default-features = false } arrow-data-48 = { package = "arrow-data", version="48", optional = true, default-features = false } arrow-data-47 = { package = "arrow-data", version="47", optional = true, default-features = false } arrow-data-46 = { package = "arrow-data", version="46", optional = true, default-features = false } arrow-data-45 = { package = "arrow-data", version="45", optional = true, default-features = false } arrow-data-44 = { package = "arrow-data", version="44", optional = true, default-features = false } arrow-data-43 = { package = "arrow-data", version="43", optional = true, default-features = false } arrow-data-42 = { package = "arrow-data", version="42", optional = true, default-features = false } arrow-data-41 = { package = "arrow-data", version="41", optional = true, default-features = false } arrow-data-40 = { package = "arrow-data", version="40", optional = true, default-features = false } arrow-data-39 = { package = "arrow-data", version="39", optional = true, default-features = false } arrow-data-38 = { package = "arrow-data", version="38", optional = true, default-features = false } arrow-data-37 = { package = "arrow-data", version="37", optional = true, default-features = false } # arrow-version:insert: arrow-schema-{version} = {{ package = "arrow-schema", version = "{version}", optional = true, default-features = false }} arrow-schema-53 = { package = "arrow-schema", version = "53", optional = true, default-features = false } arrow-schema-52 = { package = "arrow-schema", version = "52", optional = true, default-features = false } arrow-schema-51 = { package = "arrow-schema", version = "51", optional = true, default-features = false } arrow-schema-50 = { package = "arrow-schema", version = "50", optional = true, default-features = false } arrow-schema-49 = { package = "arrow-schema", version = "49", optional = true, default-features = false } arrow-schema-48 = { package = "arrow-schema", version = "48", optional = true, default-features = false } arrow-schema-47 = { package = "arrow-schema", version = "47", optional = true, default-features = false } arrow-schema-46 = { package = "arrow-schema", version = "46", optional = true, default-features = false } arrow-schema-45 = { package = "arrow-schema", version = "45", optional = true, default-features = false } arrow-schema-44 = { package = "arrow-schema", version = "44", optional = true, default-features = false } arrow-schema-43 = { package = "arrow-schema", version = "43", optional = true, default-features = false } arrow-schema-42 = { package = "arrow-schema", version = "42", optional = true, default-features = false } arrow-schema-41 = { package = "arrow-schema", version = "41", optional = true, default-features = false } arrow-schema-40 = { package = "arrow-schema", version = "40", optional = true, default-features = false } arrow-schema-39 = { package = "arrow-schema", version = "39", optional = true, default-features = false } arrow-schema-38 = { package = "arrow-schema", version = "38", optional = true, default-features = false } arrow-schema-37 = { package = "arrow-schema", version = "37", optional = true, default-features = false } arrow2-0-17 = { package = "arrow2", version = "0.17", optional = true, default-features = false } arrow2-0-16 = { package = "arrow2", version = "0.16", optional = true, default-features = false } [dev-dependencies] anyhow = "1" chrono = { version = "0.4", features = ["serde"], default-features = false } serde = { version = "1", features = ["derive", "std"], default-features = false } serde_json = "1" serde_bytes = "0.11" rand = "0.8" bigdecimal = {version = "0.4", features = ["serde"] } uuid = { version = "1.10.0", features = ["serde", "v4"] } jiff = { version = "0.1", features = ["serde"] } # for benchmarks # arrow-version:replace: arrow-json-{version} = {{ package = "arrow-json", version = "{version}" }} arrow-json-53 = { package = "arrow-json", version = "53" } criterion = "0.5" arrow2_convert = "0.5.0" serde-transcode = "1" simd-json = "0.13.8" # arrow-version:insert: arrow-schema-{version} = {{ package = "arrow-schema", version = "{version}", default-features = false, features = ["serde"] }} arrow-schema-53 = { package = "arrow-schema", version = "53", default-features = false, features = ["serde"] } arrow-schema-52 = { package = "arrow-schema", version = "52", default-features = false, features = ["serde"] } arrow-schema-51 = { package = "arrow-schema", version = "51", default-features = false, features = ["serde"] } arrow-schema-50 = { package = "arrow-schema", version = "50", default-features = false, features = ["serde"] } arrow-schema-49 = { package = "arrow-schema", version = "49", default-features = false, features = ["serde"] } arrow-schema-48 = { package = "arrow-schema", version = "48", default-features = false, features = ["serde"] } arrow-schema-47 = { package = "arrow-schema", version = "47", default-features = false, features = ["serde"] } arrow-schema-46 = { package = "arrow-schema", version = "46", default-features = false, features = ["serde"] } arrow-schema-45 = { package = "arrow-schema", version = "45", default-features = false, features = ["serde"] } arrow-schema-44 = { package = "arrow-schema", version = "44", default-features = false, features = ["serde"] } arrow-schema-43 = { package = "arrow-schema", version = "43", default-features = false, features = ["serde"] } arrow-schema-42 = { package = "arrow-schema", version = "42", default-features = false, features = ["serde"] } arrow-schema-41 = { package = "arrow-schema", version = "41", default-features = false, features = ["serde"] } arrow-schema-40 = { package = "arrow-schema", version = "40", default-features = false, features = ["serde"] } arrow-schema-39 = { package = "arrow-schema", version = "39", default-features = false, features = ["serde"] } arrow-schema-38 = { package = "arrow-schema", version = "38", default-features = false, features = ["serde"] } arrow-schema-37 = { package = "arrow-schema", version = "37", default-features = false, features = ["serde"] } [dev-dependencies.rust_decimal] version = "1.33" features = [ "serde-with-str", "serde-with-float", # NOTE activating this feature breaks JSON -> float processing # "serde-with-arbitrary-precision", ] [lints.rust.unexpected_cfgs] level = "warn" check-cfg = [ 'cfg(has_arrow2)', 'cfg(has_arrow2_0_17)', 'cfg(has_arrow2_0_16)', 'cfg(has_arrow)', 'cfg(has_arrow_fixed_binary_support)', # arrow-version:insert: 'cfg(has_arrow_{version})', 'cfg(has_arrow_53)', 'cfg(has_arrow_52)', 'cfg(has_arrow_51)', 'cfg(has_arrow_50)', 'cfg(has_arrow_49)', 'cfg(has_arrow_48)', 'cfg(has_arrow_47)', 'cfg(has_arrow_46)', 'cfg(has_arrow_45)', 'cfg(has_arrow_44)', 'cfg(has_arrow_43)', 'cfg(has_arrow_42)', 'cfg(has_arrow_41)', 'cfg(has_arrow_40)', 'cfg(has_arrow_39)', 'cfg(has_arrow_38)', 'cfg(has_arrow_37)', ]