[package]
name = "rapira"
description = "serialization library like borsh, bincode and speedy"
version = "0.13.2"
authors = ["Rail Khusnutdinov <rail@33.run>"]
keywords = ["serialization"]
categories = []
license = "MIT OR Apache-2.0"
homepage = "https://github.com/libfunc/rapira/"
documentation = "https://docs.rs/rapira/"
repository = "https://github.com/libfunc/rapira/"
readme = "../README.md"
edition = "2024"

[lib]
name = "rapira"
path = "src/lib.rs"

[features]
default = [
    "std",
    "zerocopy",
    "dep:serde",
    "serde_json",
    "arrayvec",
    "bytes",
    "time",
    "schema"
]
std = ["thiserror", "alloc", "simdutf8/std"]
alloc = []
solana = ["solana-pubkey", "solana-signature"]
rmp = []
postcard = ["dep:postcard", "dep:serde"]
schema = ["dep:armour-typ", "rapira-derive/schema"]

[dependencies]
rapira-derive = "0.12.0"

thiserror = { version = "2.0", optional = true }
zerocopy = { version = "0.8", optional = true, features = ["simd", "derive"] }
serde_json = { version = "1.0", optional = true, default-features = false, features = ["alloc"] }
indexmap = { version = "2.0", optional = true, default-features = false }
arrayvec = { version = "0.7", optional = true }
smallvec = { version = "1.8", optional = true, features = [
    "union",
    "const_generics",
    "const_new",
] }
rust_decimal = { version = "1.27", optional = true }
compact_str = { version = "0.9", optional = true }
smol_str = { version = "0.3", optional = true }
ecow = { version = "0.3", optional = true }
bytes = { version = "1.4", optional = true }
uuid = { version = "1.3", default-features = false, optional = true }
time = { version = "0.3", optional = true, default-features = false }
serde = { version = "1.0", optional = true, features = ["derive"]}
postcard = { version = "1.1", optional = true, default-features = false, features = ["use-std"] }
bytemuck = { version = "1.23", optional = true, features = ["extern_crate_alloc"] }
either = { version = "1.15", optional = true }
armour-typ = { version = "0.3", path = "../armour-typ", optional = true }

fjall = { version = "3.1", optional = true }
byteview = { version = "0.10", optional = true }

solana-pubkey = { version = "4.0", optional = true }
solana-signature = { version = "3.1", optional = true }

[target.'cfg(not(target_env = "aarch64-apple-darwin"))'.dependencies]
simdutf8 = { version = "0.1", default-features = false }

[target.'cfg(target_env = "aarch64-apple-darwin")'.dependencies]
simdutf8 = { version = "0.1", default-features = false, features = ["aarch64_neon"] }

[dev-dependencies]
armour-core = { path = "../armour-core" }
