1 | [package] |
2 | name = "borsh" |
3 | version.workspace = true |
4 | rust-version.workspace = true |
5 | authors = ["Near Inc <hello@near.org>" ] |
6 | edition = "2018" |
7 | license = "MIT OR Apache-2.0" |
8 | readme = "README.md" |
9 | categories = ["encoding" , "network-programming" ] |
10 | repository = "https://github.com/near/borsh-rs" |
11 | homepage = "https://borsh.io" |
12 | description = "" " |
13 | Binary Object Representation Serializer for Hashing |
14 | " "" |
15 | exclude = ["*.snap" ] |
16 | |
17 | [lib] |
18 | name = "borsh" |
19 | path = "src/lib.rs" |
20 | |
21 | [[example]] |
22 | name = "serde_json_value" |
23 | required-features = ["std" , "derive" ] |
24 | |
25 | [[bin]] |
26 | name = "generate_schema_schema" |
27 | path = "src/generate_schema_schema.rs" |
28 | required-features = ["std" , "unstable__schema" ] |
29 | |
30 | [build-dependencies] |
31 | cfg_aliases = "0.2.1" |
32 | |
33 | [dependencies] |
34 | ascii = { version = "1.1" , optional = true } |
35 | borsh-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: |
40 | hashbrown = { version = ">=0.11,<0.16.0" , optional = true } |
41 | bytes = { version = "1" , optional = true } |
42 | indexmap = { version = "2" , optional = true } |
43 | bson = { version = "2" , optional = true } |
44 | |
45 | [dev-dependencies] |
46 | insta = "1.29.0" |
47 | serde_json = { version = "1" } |
48 | |
49 | [package.metadata.docs.rs] |
50 | features = ["derive" , "unstable__schema" , "rc" ] |
51 | targets = ["x86_64-unknown-linux-gnu" ] |
52 | |
53 | [features] |
54 | default = ["std" ] |
55 | derive = ["borsh-derive" ] |
56 | unstable__schema = ["derive" , "borsh-derive/schema" ] |
57 | std = [] |
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. |
61 | rc = [] |
62 | de_strict_order = [] |
63 | |