[package] name = "struson" version = "0.5.0" authors = ["Marcono1234"] edition = "2021" description = "A low-level streaming JSON reader and writer" license = "MIT OR Apache-2.0" repository = "https://github.com/Marcono1234/struson" keywords = ["json", "streaming", "parser"] categories = ["parser-implementations"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] thiserror = "1.0.57" strum = { version = "0.26.2", features = ["derive"] } duplicate = "1.0.0" serde = { version = "1.0.197", optional = true } [dev-dependencies] criterion = { version = "0.5.1", features = ["html_reports"] } # Serde is used for comparison in benchmarks and for tests serde = "1.0.197" # When updating serde_json, adjust Struson Serde integration behavior to match serde_json serde_json = "1.0.114" # Used for verifying in allocation tests that no allocations occur in certain situations # Specify Git revision because version with "backtrace" feature has not been released yet assert_no_alloc = { git = "https://github.com/Windfisch/rust-assert-no-alloc.git", rev = "d31f2d5f550ce339d1c2f0c1ab7da951224b20df", features = [ "backtrace", ] } [features] # Feature for all experimental functionality of Struson which is likely going to change in the future, # or might even be removed again # Note: Might be better to use standard Rust attributes for this once they are available, see https://github.com/rust-lang/rfcs/issues/1491 experimental = [] [lints.rust] unsafe_code = "forbid" # The documentation discourages omitting `'_` in paths, but this lint is "allow" by default, # see https://doc.rust-lang.org/reference/lifetime-elision.html#lifetime-elision-in-functions elided_lifetimes_in_paths = "warn" [lints.clippy] # Allow needless `return` because that makes it sometimes more obvious that # an expression is the result of the function needless_return = "allow" # Allow `assert_eq!(true, ...)` because in some cases it is used to check a bool # value and not a 'flag' / 'state', and `assert_eq!` makes that more explicit bool_assert_comparison = "allow" # docs.rs specific configuration [package.metadata.docs.rs] # Document all features all-features = true # Set configuration flag to enable docs.rs specific doc attributes, such as `doc_auto_cfg` # See https://stackoverflow.com/q/61417452 rustdoc-args = ["--cfg", "docsrs"] # Cargo Profile for manual performance profiling [profile.release-debug] inherits = "release" debug = true # For all these benchmarks disable default harness (`harness = false`) because Criterion creates its own [[bench]] name = "reader_benchmark" harness = false [[bench]] name = "reader_struct_benchmark" harness = false [[bench]] name = "writer_benchmark" harness = false [[bench]] name = "writer_struct_benchmark" harness = false [[bench]] name = "serde_serialize_benchmark" harness = false required-features = ["serde"] [[bench]] name = "serde_deserialize_benchmark" harness = false required-features = ["serde"]