mirror of
https://github.com/maplibre/maplibre-rs.git
synced 2025-12-08 19:05:57 +00:00
* Add geometry index again * Switch to info level for run config * Add setting for present_mode * Remove unused file * Adjust web to new message * Update package-lock.json * One of the first working versions with a large buffer * Add features to fix builds * Switch to flatbuffers for data passing * Cleanup and move entries to wasm_entries * Install protobuf and flatbuffers * Fix windows CI * Fix clippy errors and warnings for generated code
27 lines
664 B
Rust
27 lines
664 B
Rust
use std::{env, fs, path::Path};
|
|
|
|
fn main() {
|
|
let out_dir = env::var("OUT_DIR").unwrap();
|
|
|
|
println!("cargo:rerun-if-changed=./flatbuffer");
|
|
|
|
let flatbuffer = fs::read_dir("./flatbuffer")
|
|
.unwrap()
|
|
.map(|entry| entry.unwrap().path())
|
|
.collect::<Vec<_>>();
|
|
|
|
flatc_rust::run(flatc_rust::Args {
|
|
inputs: &flatbuffer
|
|
.iter()
|
|
.map(|buf| buf.as_path())
|
|
.collect::<Vec<_>>(),
|
|
out_dir: Path::new(&out_dir),
|
|
extra: &[
|
|
"--include-prefix",
|
|
"platform::singlethreaded::transferables",
|
|
],
|
|
..Default::default()
|
|
})
|
|
.expect("flatc");
|
|
}
|