commit | 9e82ee25275e07e35f489f6feac543611f81fb83 | [log] [tgz] |
---|---|---|
author | tymcauley <16469394+tymcauley@users.noreply.github.com> | Fri Mar 08 04:06:25 2019 -0500 |
committer | Robert <rw@users.noreply.github.com> | Fri Mar 08 01:06:25 2019 -0800 |
tree | 40ff1df617329f88f532a6db8d067043194bb6d6 | |
parent | e237f53bfcee593f813c502b888784c7fb081aa9 [diff] |
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.
FlatBuffers is a cross platform serialization library architected for maximum memory efficiency. It allows you to directly access serialized data without parsing/unpacking it first, while still having great forwards/backwards compatibility.
Go to our landing page to browse our documentation.
and more in progress...
flatbuffers
tag for any questions regarding FlatBuffers.To contribute to this project, see CONTRIBUTING.
Flatbuffers is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.