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/Actr.toml.hbs"),
22 files,
23 "Actr.toml",
24 )?;
25
26 ProjectTemplate::load_file(
28 &fixtures_root.join("echo-service/echo.proto"),
29 files,
30 "protos/echo.proto",
31 )?;
32
33 ProjectTemplate::load_file(&fixtures_root.join("rust/build.rs.hbs"), files, "build.rs")?;
35
36 ProjectTemplate::load_file(
38 &fixtures_root.join("rust/README.md.hbs"),
39 files,
40 "README.md",
41 )?;
42
43 ProjectTemplate::load_file(
45 &fixtures_root.join("rust/gitignore.hbs"),
46 files,
47 ".gitignore",
48 )?;
49
50 Ok(())
51}