Commit Graph

73 Commits

Author SHA1 Message Date
Wouter van Oortmerssen 6df40a2471 pre-tag version bump for 1.12
Change-Id: I84a9365e9d8a1afe333b1df85058401ffe0a6b7c
2020-03-12 15:33:39 -07:00
jean-airoldie 95a21327fc
rust: pub export the VectorIter type (#5736) 2020-03-09 17:25:03 -07:00
Robert Winslow 6400c9b054
Bump Rust port to 0.6.1 (#5747) 2020-01-30 13:55:44 -08:00
messense 405c64e07d [Rust] Bump smallvec version to 1.0 (#5621)
See https://github.com/servo/rust-smallvec/pull/175 for changelog.
2019-11-11 09:52:26 -08:00
Mathias Svensson 521e255ad9 Rust: Add idiomatic iterator for Vector type (#5579)
* Rust: Add idiomatic iterator for Vector type

* Add comments explaining some implementation details
2019-10-28 14:19:47 -04:00
Mathias Svensson b4774d2354 Rust: Fix Copy and Clone impls for a few generic types (#5577)
* 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-28 00:20:29 -04:00
StackDoubleFlow e93c8c46e6 Fix Follow implementation for bool (#5554) 2019-10-19 23:24:13 -04:00
Casper c0282873fb Rust: Fixed cargo clippy on non-generated code (#5485)
* Cargo clippy lints

* more lints

* more lints

* Restored a doc comment

* Comment on float eps-eq and adjusted casting
2019-09-09 13:02:43 -07:00
jean-airoldie db972be264 [rust] Ran rustfmt against library code (#5389) 2019-07-09 13:41:51 -07:00
jean-airoldie b80ad7e439 [rust] Use read_scalar_at where possible (#5385)
This slightly improves readability.
2019-06-07 14:06:20 -07:00
jean-airoldie 16aef8ac0d [rust] Derive Eq + PartialEq on FieldLoc and FlatBufferBuilder (#5394) 2019-06-06 14:09:58 -07:00
jean-airoldie e5b6125fa2 Added common rust traits to FlatBufferBuilder (#5307)
* Added Clone, Debug and Default
2019-04-26 18:40:10 -07:00
Wouter van Oortmerssen 9e7e8cbe9f Bumped version to 1.11.0
Change-Id: I0c87ad2cf8f8768cf40c5b7abea0add087a5518a
2019-04-24 11:34:53 -07:00
tymcauley 9e82ee2527 Fix rust crate for big-endian targets (#5229)
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.
2019-03-08 01:06:25 -08:00
Robert b378b8eb69
Fix create_vector_of_strings to use the stack, and test it. (#5074) 2018-11-29 11:47:28 -08:00
Wouter van Oortmerssen c0698cc33f Bumped version to 1.10.1 for all languages.
Change-Id: I9a6256d90ea800834a887afdcf888df412018933
2018-10-03 12:48:47 -07:00
kzvi a89be8739c loosen lifetimes in type signature of Table::get (#4925) 2018-09-27 20:56:49 -07:00
Onur Karaman 10e1d1a69e fix rust flatbuffers create_vector docs (#4913)
Manual vector creation begins with start_vector, not create_vector.
2018-09-04 14:30:31 -07:00
Robert ba4a02b46a
Update Cargo.toml for Crates.io package 2018-09-03 19:42:25 -07:00
Robert be3d0b9c64
delete and ignore Cargo.lock files (#4906) 2018-09-03 19:33:38 -07:00
Robert 9e648c392b
Rust: Add basic crate-level documentation 2018-09-03 18:01:31 -07:00
Robert d4f65bb8a3
Update Rust runtime crate version for publishing 2018-09-03 17:13:10 -07:00
Robert 3c54fd964b Port FlatBuffers to Rust (#4898)
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.
2018-09-02 18:26:55 -07:00