You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/04/26 11:23:42 UTC
[GitHub] [arrow-rs] alamb opened a new issue #42: Generate flatbuffers code automatically
alamb opened a new issue #42:
URL: https://github.com/apache/arrow-rs/issues/42
*Note*: migrated from original JIRA: https://issues.apache.org/jira/browse/ARROW-5135
This depends on the following upstream flatbuffers issues:
- https://github.com/google/flatbuffers/issues/5052
- https://github.com/google/flatbuffers/issues/5053
- https://github.com/google/flatbuffers/issues/5054
Once they are resolved We should generate flatbuffers code automatically,
as suggested by [~nevi_me]:
{code}
// [arrow/rust/arrow/build.rs]
use std::path::Path;
use flatc_rust;
fn main() {
flatc_rust::run(flatc_rust::Args {
lang: "rust",
inputs: &[
Path::new("../../format/FIle.fbs"),
Path::new("../../format/Message.fbs"),
Path::new("../../format/Schema.fbs"),
Path::new("../../format/Tensor.fbs"),
Path::new("../../format/SparseTensor.fbs"),
],
out_dir: Path::new("./src/ipc/gen/"),
// doesn't seem to be honoured
includes: &[Path::new("../../format/")],
..Default::default()
}).expect("Unable to build flatbuffer files");
}
// [arrow/rust/arrow/Cargo.toml]
[package]
...
build = "build.rs"
...
[build-dependencies]
flatc-rust = "0.1"
{code}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org