Files
flatbuffers/tests/rust_usage_test/Cargo.toml
Casper 9fa1d27059 Rework enums in rust. (#6098)
* Rework enums in rust.

They're now a unit struct, rather than an enum. This is a
backwards incompatible change but the previous version had UB
and was also backwards incompatible so...

* Update and test sample rust flatbuffers

* Use bitflags crate to properly support rust enums.

Previously, the bitflags attribute was just ignored. This is a breaking change
as the bitflgs API is not like a normal rust enum (duh).

* variant_name() -> Option<_>

* repr transparent

* Reexport bitflags from flatbuffers

* Make bitflags constants CamelCase, matching normal enums

* Deprecate c-style associated enum constants

Co-authored-by: Casper Neo <cneo@google.com>
2020-10-19 11:40:03 -07:00

52 lines
1.0 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" }
flexbuffers = { path = "../../rust/flexbuffers" }
serde_derive = "1.0"
serde = "1.0"
serde_bytes = "0.11"
[[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
bencher = "0.1.5"
static_assertions = "1.0.0"
rand = "*"
quickcheck_derive = "*"
[[bench]]
# setup for bencher
name = "benchmarks"
harness = false