mirror of
https://github.com/speice-io/marketdata-shootout
synced 2026-05-01 05:20:19 -04:00
Add initial support for SBE
After having some time to review the code, I'm a huge fan.
This commit is contained in:
17
build.rs
17
build.rs
@ -1,6 +1,7 @@
|
||||
extern crate capnpc;
|
||||
|
||||
use std::path::Path;
|
||||
use std::process::Command;
|
||||
|
||||
fn main() {
|
||||
capnpc::CompilerCommand::new()
|
||||
@ -14,6 +15,18 @@ fn main() {
|
||||
inputs: &[Path::new("marketdata.fbs")],
|
||||
out_dir: Path::new("src/"),
|
||||
..Default::default()
|
||||
})
|
||||
.expect("Unable to compile flatc");
|
||||
}).expect("Unable to compile flatc");
|
||||
|
||||
// There's no Rust-style builder crate for SBE,
|
||||
// so we need to run the command by hand.
|
||||
// TODO: Automatically download the SBE JAR?
|
||||
let _output = Command::new("java")
|
||||
.arg("-Dsbe.output.dir=src")
|
||||
.arg("-Dsbe.xinclude.aware=true")
|
||||
.arg("-Dsbe.target.language=uk.co.real_logic.sbe.generation.rust.Rust")
|
||||
.arg("-Dsbe.target.namespace=marketdata_sbe")
|
||||
.arg("-jar").arg("sbe-all-1.13.2-all.jar")
|
||||
.arg("marketdata.xml")
|
||||
.output()
|
||||
.expect("Unable to execute SBE compiler");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user