1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
use cratemacro_generate_files;
use crateFileGenerationParams;
use fs;
use io;
/// Generates files for a new Rust project based on a TOML file.
///
/// The TOML file must contain a single object with the following
/// properties:
///
/// - `author` - the author of the project (optional).
/// - `build` - the build command to be used for building the project (optional).
/// - `categories` - the categories that the project belongs to (optional).
/// - `description` - a short description of the project (optional).
/// - `documentation` - the documentation URL of the project (optional).
/// - `edition` - the edition of the project (optional).
/// - `email` - the email address of the author (optional).
/// - `homepage` - the homepage of the project (optional).
/// - `keywords` - keywords that describe the project (optional).
/// - `license` - the license under which the project is released (optional).
/// - `name` - the name of the project (optional).
/// - `output` - the output directory where the project files will be created (required).
/// - `readme` - the name of the readme file (optional).
/// - `repository` - the url of the project's repository (optional).
/// - `rustversion` - the minimum Rust version required by the project (optional).
/// - version - the initial version of the project (optional).
/// - website - the website of the project (optional).
///
/// # Errors
///
/// This function will return an error in the following situations:
///
/// - If the specified TOML file cannot be found, read, or is not valid UTF-8.
/// - If the TOML data cannot be deserialized into the FileGenerationParams struct.
/// - If there is an error in generating files based on the parameters.
///