A Rust library for reading the OpenStreetMap PBF file format (*.osm.pbf).

12345678910111213141516171819202122232425
  1. //! To regenerate *.rs files in `src/proto/` rename this file to `build.rs`
  2. //! and add this to `Cargo.toml`:
  3. //! ```
  4. //! [build-dependencies]
  5. //! protoc-rust = "2.0"
  6. //! ```
  7. extern crate protoc_rust;
  8. fn main() {
  9. let proto_files = ["src/proto/fileformat.proto", "src/proto/osmformat.proto"];
  10. for path in &proto_files {
  11. println!("cargo:rerun-if-changed={}", path);
  12. }
  13. protoc_rust::run(protoc_rust::Args {
  14. out_dir: "src/proto",
  15. input: &proto_files,
  16. customize: protoc_rust::Customize {
  17. ..Default::default()
  18. },
  19. includes: &[],
  20. }).expect("protoc");
  21. }