summaryrefslogtreecommitdiff
path: root/rust
AgeCommit message (Collapse)AuthorFilesLines
2020-06-18Rust Flexbuffers Documentation update (#5979)Casper2-2/+12
* Update samples and docs * Fixed a line of documentation Co-authored-by: Casper Neo <cneo@google.com>
2020-06-08[rust] Add FlatBufferBuilder::force_defaults API (#5946)Matt Brubeck1-3/+16
* [rust] Add force_defaults method FlatBufferBuilder This works just like the same method already available in other languages. * Add binary format test for force_defaults
2020-05-13Fix Cargo.toml dependencies (#5911)Casper1-7/+2
* Fix Cargo.toml dependencies * less specific serde dependency Co-authored-by: Casper Neo <cneo@google.com>
2020-05-11Update Rust Flexbuffers metadata before publishing (#5905)Casper1-1/+6
Co-authored-by: Casper Neo <cneo@google.com>
2020-05-07Rust Flexbuffers (#5669)Casper17-0/+3206
* Cargo clippy lints * more lints * more lints * Restored a doc comment * Comment on float eps-eq and adjusted casting * Rust Flexbuffers * more serde tests, removed some unsafe * Redid serde to be map-like and Reader is Display * Moved iter from Reader to VectorReader * Serious quickcheck + bugs * wvo api * Made types smaller for a reasonable speedup * redid reading in a way that's a bit faster. Profiling shows the rust slowdown as building +10%, reading +20% * src/bin are developer binaries in rust * Root and Map width are not packed * key null check is debug only + doc changes * BuilderOptions * Documentation * Documentation * Moved tests to rust_usage_test * Moved rust flexbuffers samples to Flatbuffers/samples * Fixed RustTest * Fixed for Rust 1.37.0 * Upgraded to rust 1_40_0 * fixed a little-endian-only feature in a test * 1.40.0 * fixed some benchmarks for bigendian * Updated .bat file * misspelling * Gold Flexbuffer test. * Serialize,Deserialize, std::error::Error for Errors. * Undo rustfmt in integration_test.rs * from_slice instead of from_vec * Added comments to unsafe blocks * expanded on comment * bump Co-authored-by: CasperN <cneo@google.com>
2020-03-12pre-tag version bump for 1.12v1.12.0Wouter van Oortmerssen1-1/+1
Change-Id: I84a9365e9d8a1afe333b1df85058401ffe0a6b7c
2020-03-09rust: pub export the VectorIter type (#5736)jean-airoldie2-1/+2
2020-01-30Bump Rust port to 0.6.1 (#5747)Robert Winslow1-1/+1
2019-11-11[Rust] Bump smallvec version to 1.0 (#5621)messense1-1/+1
See https://github.com/servo/rust-smallvec/pull/175 for changelog.
2019-10-28Rust: Add idiomatic iterator for Vector type (#5579)Mathias Svensson1-3/+129
* Rust: Add idiomatic iterator for Vector type * Add comments explaining some implementation details
2019-10-28Rust: Fix Copy and Clone impls for a few generic types (#5577)Mathias Svensson2-6/+41
* Rust: Fix Copy and Clone impls for a few generic types * Add tests for Copy+Clone * Wrap Copy+Clone checks in a #[test] function
2019-10-19Fix Follow implementation for bool (#5554)StackDoubleFlow1-1/+8
2019-09-09Rust: Fixed cargo clippy on non-generated code (#5485)Casper6-25/+20
* Cargo clippy lints * more lints * more lints * Restored a doc comment * Comment on float eps-eq and adjusted casting
2019-07-09[rust] Ran rustfmt against library code (#5389)jean-airoldie8-60/+108
2019-06-07[rust] Use read_scalar_at where possible (#5385)jean-airoldie3-8/+8
This slightly improves readability.
2019-06-06[rust] Derive Eq + PartialEq on FieldLoc and FlatBufferBuilder (#5394)jean-airoldie1-2/+2
2019-04-26Added common rust traits to FlatBufferBuilder (#5307)jean-airoldie1-0/+7
* Added Clone, Debug and Default
2019-04-24Bumped version to 1.11.0v1.11.0Wouter van Oortmerssen1-1/+1
Change-Id: I0c87ad2cf8f8768cf40c5b7abea0add087a5518a
2019-03-08Fix rust crate for big-endian targets (#5229)tymcauley2-5/+9
Thanks for tackling this, @tymcauley ! * big endian docker test -- wip * tweaks * tweaks * tweaks * docker tweaks * fix conditional compilation issues * reactivate other docker tests * try some more cross-platform config (from tymcauley) * Update tests/docker/languages/Dockerfile.testing.rust.big_endian.1_30_1 Co-Authored-By: rw <rw@users.noreply.github.com> * Update tests/docker/languages/Dockerfile.testing.rust.big_endian.1_30_1 Co-Authored-By: rw <rw@users.noreply.github.com> * Update tests/docker/languages/Dockerfile.testing.rust.big_endian.1_30_1 Co-Authored-By: rw <rw@users.noreply.github.com> * Resolved Rust warnings during big-endian builds. * Unify Rust test suites for x86 and MIPS builds. Note that I had to add four extra packages to the MIPS `Dockerfile`: `libexpat1`, `libmagic1`, `libmpdec2`, and `libreadline7`. For a reason I couldn't identify, even the simplest Rust MIPS binaries run with `qemu-mips` would fail with a segfault when run through this `Dockerfile`. After installing the `gdb-multiarch` package to attempt to debug the issue, the binaries ran successfully. I pared down the packages installed by `gdb-multiarch`, and these four packages are the minimum subset necessary to get Rust MIPS binaries running under `qemu-mips`. * Changed Rust tests to use `Vector`s instead of direct-slice-access. The direct-slice-access method is not available on big-endian targets, but `flatbuffers::Vector`s provide an array interface that is available on all platforms. * Resolved FooStruct endianness issues using explicit struct constructor. This more closely resembles how FlatBuffers structs are constructed in generated Rust code. * Added explanation of how `FooStruct` parallels generated struct code. Also collected duplicate implementations of `FooStruct` into a common location.
2018-11-29Fix create_vector_of_strings to use the stack, and test it. (#5074)Robert1-3/+7
2018-10-03Bumped version to 1.10.1 for all languages.v1.10.0Wouter van Oortmerssen1-1/+1
Change-Id: I9a6256d90ea800834a887afdcf888df412018933
2018-09-27loosen lifetimes in type signature of Table::get (#4925)kzvi1-2/+2
2018-09-04fix rust flatbuffers create_vector docs (#4913)Onur Karaman1-2/+2
Manual vector creation begins with start_vector, not create_vector.
2018-09-03Update Cargo.toml for Crates.io packageRobert1-0/+6
2018-09-03delete and ignore Cargo.lock files (#4906)Robert1-4/+0
2018-09-03Rust: Add basic crate-level documentationRobert1-0/+14
2018-09-03Update Rust runtime crate version for publishingRobert1-1/+1
2018-09-02Port FlatBuffers to Rust (#4898)Robert12-0/+1696
This is a port of FlatBuffers to Rust. It provides code generation and a runtime library derived from the C++ implementation. It utilizes the Rust type system to provide safe and fast traversal of FlatBuffers data. There are 188 tests, including many fuzz tests of roundtrips for various serialization scenarios. Initial benchmarks indicate that the canonical example payload can be written in ~700ns, and traversed in ~100ns. Rustaceans may be interested in the Follow, Push, and SafeSliceAccess traits. These traits lift traversals, reads, writes, and slice accesses into the type system, providing abstraction with no runtime penalty.