chore(project): initialize project with core configuration and dependencies
- Add .gitignore and .env.example files for project setup - Create build script for proto compilation with tonic-prost - Generate Cargo.lock with all project dependencies - Configure project structure and ignore patterns for development environment
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
use std::{env, path::PathBuf};
|
||||
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
println!("cargo:rerun-if-changed=proto/email.proto");
|
||||
println!("cargo:rerun-if-changed=proto");
|
||||
|
||||
let out_dir = PathBuf::from(env::var("OUT_DIR")?).join("pb");
|
||||
std::fs::create_dir_all(&out_dir)?;
|
||||
|
||||
tonic_prost_build::configure()
|
||||
.out_dir(&out_dir)
|
||||
.compile_protos(&["proto/email.proto"], &["proto"])?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user