Files
mailks/build.rs
T
zhenyi 5fa7a82548 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
2026-06-07 22:46:30 +08:00

16 lines
436 B
Rust

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(())
}