Skip to content

Commit

Permalink
fix: created out-folder if not exists
Browse files Browse the repository at this point in the history
  • Loading branch information
raphael-goetz committed Aug 21, 2024
1 parent 82a0bf2 commit 76c2e75
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion build/rust/build.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
use std::fs::create_dir;
use std::io::Result;

fn main() -> Result<()> {

let path = "src/internal";

if !std::path::Path::new(&path).exists() {
create_dir(path)?;
}

tonic_build::configure()
.out_dir("src/internal")
.out_dir(path)
.build_server(true)
.build_client(true)
.type_attribute("Variable", "#[derive(serde::Serialize, serde::Deserialize)]")
Expand Down

0 comments on commit 76c2e75

Please sign in to comment.