Files
flatbuffers-bigfoot/tests/rust_usage_test/Cargo.toml
Max Burke 1d294a31b8 Implement Serialize on generated rust types (#7022)
* fix for rust build

* Rust: Implement Serialize on generated types

For debugging convenience it is really handy to be able to dump out
types as another format (ie: json). For example, if we are logging a
type to a structured logging system, or even printing it out in a
structured way to the console.

Right now we handle this by shelling out to `flatc` which is not ideal;
by implementing Serialize on the generated types we can use any of the
Serializer-implementing packages for our structured debug output.

* clang-format

* Make the flatbuffers Rust crate only have an optional dependency on the `serde` packages.

* fix warning

* fix rust test build

* Oh yeah this needs to be initialized

* fix toml syntax

* code review feedback

* rebuild test data
2022-01-30 19:29:18 -05:00

58 lines
1.2 KiB
TOML

[package]
name = "rust_usage_test"
version = "0.1.0"
authors = ["Robert Winslow <hello@rwinslow.com>",
"Casper Neo <cneo@google.com>",
"FlatBuffers Maintainers"]
[dependencies]
flatbuffers = { path = "../../rust/flatbuffers", default-features = false }
flexbuffers = { path = "../../rust/flexbuffers" }
serde_derive = "1.0"
serde = "1.0"
serde_bytes = "0.11"
libc_alloc = { version = "1.0.3", optional = true }
[features]
default = ["flatbuffers/default"]
no_std = ["flatbuffers/no_std", "libc_alloc"]
[[bin]]
name = "monster_example"
path = "bin/monster_example.rs"
[[bin]]
name = "flatbuffers_alloc_check"
path = "bin/flatbuffers_alloc_check.rs"
[[bin]]
name = "flexbuffers_alloc_check"
path = "bin/flexbuffers_alloc_check.rs"
[[bin]]
name = "sample_flexbuffers"
path = "../../samples/sample_flexbuffers.rs"
[[bin]]
name = "sample_flexbuffers_serde"
path = "../../samples/sample_flexbuffers_serde.rs"
[[bin]]
name = "sample_flatbuffers"
path = "../../samples/sample_binary.rs"
[dev-dependencies]
quickcheck = "0.6"
# TODO(rw): look into moving to criterion.rs
serde = "1.0"
bencher = "0.1.5"
static_assertions = "1.0.0"
rand = "*"
quickcheck_derive = "*"
array-init = "2.0"
[[bench]]
# setup for bencher
name = "benchmarks"
harness = false