Skip to content

Commit

Permalink
cargo-powdr gitignore add on template (#2213)
Browse files Browse the repository at this point in the history
  • Loading branch information
MuhtasimTanmoy authored Dec 11, 2024
1 parent 4f1aa4a commit 56d43c4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cargo-powdr/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const HOST_MAIN_TEMPLATE: &str = include_str!("../template/src/main.rs");
const HOST_README_TEMPLATE: &str = include_str!("../template/README.md");
const GUEST_CARGO_TOML_TEMPLATE: &str = include_str!("../template/guest/Cargo.toml.template");
const GUEST_MAIN_TEMPLATE: &str = include_str!("../template/guest/src/main.rs");
const GITIGNORE: &str = include_str!("../template/.gitignore.template");

fn main() -> Result<(), io::Error> {
let args = Cli::parse();
Expand Down Expand Up @@ -90,6 +91,7 @@ fn new_project(project_name: String, guest_name: String) -> Result<(), Error> {
HOST_TOOLCHAIN_TEMPLATE,
)?;
create_file(&project_dir.join("README.md"), HOST_README_TEMPLATE)?;
create_file(&project_dir.join(".gitignore"), GITIGNORE)?;
create_file(&src_dir.join("main.rs"), HOST_MAIN_TEMPLATE)?;
create_file(&guest_dir.join("Cargo.toml"), GUEST_CARGO_TOML_TEMPLATE)?;
create_file(&guest_src_dir.join("main.rs"), GUEST_MAIN_TEMPLATE)?;
Expand Down
4 changes: 4 additions & 0 deletions cargo-powdr/template/.gitignore.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
target
Cargo.lock
guest/Cargo.lock
powdr-target

0 comments on commit 56d43c4

Please sign in to comment.