feat(build): Expose Prost generation plugin (#947)
This commit is contained in:
@@ -412,10 +412,16 @@ impl Builder {
|
|||||||
config.protoc_arg(arg);
|
config.protoc_arg(arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
config.service_generator(Box::new(ServiceGenerator::new(self)));
|
config.service_generator(self.service_generator());
|
||||||
|
|
||||||
config.compile_protos(protos, includes)?;
|
config.compile_protos(protos, includes)?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Turn the builder into a `ServiceGenerator` ready to be passed to `prost-build`s
|
||||||
|
/// `Config::service_generator`.
|
||||||
|
pub fn service_generator(self) -> Box<dyn prost_build::ServiceGenerator> {
|
||||||
|
Box::new(ServiceGenerator::new(self))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user