1[package]
2name = "borsh"
3version.workspace = true
4rust-version.workspace = true
5authors = ["Near Inc <hello@near.org>"]
6edition = "2018"
7license = "MIT OR Apache-2.0"
8readme = "README.md"
9categories = ["encoding", "network-programming"]
10repository = "https://github.com/near/borsh-rs"
11homepage = "https://borsh.io"
12description = """
13Binary Object Representation Serializer for Hashing
14"""
15exclude = ["*.snap"]
16
17[lib]
18name = "borsh"
19path = "src/lib.rs"
20
21[[example]]
22name = "serde_json_value"
23required-features = ["std", "derive"]
24
25[[bin]]
26name = "generate_schema_schema"
27path = "src/generate_schema_schema.rs"
28required-features = ["std", "unstable__schema"]
29
30[build-dependencies]
31cfg_aliases = "0.2.1"
32
33[dependencies]
34ascii = { version = "1.1", optional = true }
35borsh-derive = { path = "../borsh-derive", version = "~1.5.7", optional = true }
36
37# hashbrown can be used in no-std context.
38# NOTE: There is no reason to restrict use of older versions, but we don't want to get
39# sudden breaking changes with an open range of versions, so we limit the range by not yet released 0.16.0 version:
40hashbrown = { version = ">=0.11,<0.16.0", optional = true }
41bytes = { version = "1", optional = true }
42indexmap = { version = "2", optional = true }
43bson = { version = "2", optional = true }
44
45[dev-dependencies]
46insta = "1.29.0"
47serde_json = { version = "1" }
48
49[package.metadata.docs.rs]
50features = ["derive", "unstable__schema", "rc"]
51targets = ["x86_64-unknown-linux-gnu"]
52
53[features]
54default = ["std"]
55derive = ["borsh-derive"]
56unstable__schema = ["derive", "borsh-derive/schema"]
57std = []
58# Opt into impls for Rc<T> and Arc<T>. Serializing and deserializing these types
59# does not preserve identity and may result in multiple copies of the same data.
60# Be sure that this is what you want before enabling this feature.
61rc = []
62de_strict_order = []
63