Skip to content

Commit

Permalink
Merge pull request #229 from zksecurity/fix/build-copy
Browse files Browse the repository at this point in the history
fix: only copy assets and stdlib
  • Loading branch information
mimoo authored Nov 10, 2024
2 parents 3a77c86 + 83a4099 commit 429f765
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ fn main() {
}

let current_dir = env::current_dir().expect("could not get current directory");
let folders = ["assets", "src/stdlib"];

// Set up copy options
let mut options = CopyOptions::new();
options.overwrite = true; // Overwrite existing files
options.copy_inside = true; // Copy contents inside the source directory

// Copy the current folder to the release directory
dir::copy(current_dir, &release_dir, &options)
.expect("could not copy current directory to release directory");
for folder in &folders {
let src = current_dir.join(folder);
dir::copy(&src, &release_dir.join(folder), &options)
.expect("could not copy assets and stdlib folders to release directory");
}
}

0 comments on commit 429f765

Please sign in to comment.