actr_cli/templates/rust/
echo.rs1use crate::error::Result;
2use crate::templates::ProjectTemplate;
3use std::collections::HashMap;
4use std::path::Path;
5
6pub fn load(files: &mut HashMap<String, String>) -> Result<()> {
7 let fixtures_root = Path::new(env!("CARGO_MANIFEST_DIR")).join("fixtures");
8
9 ProjectTemplate::load_file(
11 &fixtures_root.join("rust/Cargo.toml.hbs"),
12 files,
13 "Cargo.toml",
14 )?;
15
16 ProjectTemplate::load_file(&fixtures_root.join("rust/lib.rs.hbs"), files, "src/lib.rs")?;
18
19 ProjectTemplate::load_file(
21 &fixtures_root.join("rust/echo/Actr.toml.hbs"),
22 files,
23 "Actr.toml",
24 )?;
25
26 ProjectTemplate::load_file(&fixtures_root.join("rust/build.rs.hbs"), files, "build.rs")?;
28
29 ProjectTemplate::load_file(
31 &fixtures_root.join("rust/echo/README.md.hbs"),
32 files,
33 "README.md",
34 )?;
35
36 ProjectTemplate::load_file(
38 &fixtures_root.join("rust/gitignore.hbs"),
39 files,
40 ".gitignore",
41 )?;
42
43 Ok(())
44}