Skip to content

Commit

Permalink
Couple of improvements and cleanup.
Browse files Browse the repository at this point in the history
+ Include directories are automatically added based on nearby Cargo.toml files (This generally just means that imports work like you'd expect)
+ Type filters
+ Type attributes
  • Loading branch information
Jeremy Barrow committed Jun 19, 2024
1 parent c3f0885 commit a908bc5
Show file tree
Hide file tree
Showing 9 changed files with 234 additions and 140 deletions.
10 changes: 4 additions & 6 deletions examples/shared/build.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
use gin_tonic::{BuildEnvironment, Compiler};
use std::path::PathBuf;
use gin_tonic::Compiler;

pub fn main() -> Result<(), Box<dyn std::error::Error>> {
Compiler::new(BuildEnvironment::new()?)
.include([PathBuf::from("../..")])
Compiler::new()
.with_well_known_types()
.add_proto_files(["proto/example.proto"])
.compile(Some("./src"))?;
.add_proto_file("proto/example.proto")
.compile_into("./src")?;

Ok(())
}
Loading

0 comments on commit a908bc5

Please sign in to comment.