@@ -5,6 +5,7 @@ mod build;
5
5
mod clean;
6
6
mod clone_gcc;
7
7
mod config;
8
+ mod fmt;
8
9
mod info;
9
10
mod prepare;
10
11
mod rust_tools;
@@ -41,7 +42,8 @@ Commands:
41
42
build : Compiles the project.
42
43
test : Runs tests for the project.
43
44
info : Displays information about the build environment and project configuration.
44
- clone-gcc : Clones the GCC compiler from a specified source."
45
+ clone-gcc : Clones the GCC compiler from a specified source.
46
+ fmt : Runs rustfmt"
45
47
) ;
46
48
}
47
49
@@ -54,6 +56,7 @@ pub enum Command {
54
56
Rustc ,
55
57
Test ,
56
58
Info ,
59
+ Fmt ,
57
60
}
58
61
59
62
fn main ( ) {
@@ -70,6 +73,7 @@ fn main() {
70
73
Some ( "test" ) => Command :: Test ,
71
74
Some ( "info" ) => Command :: Info ,
72
75
Some ( "clone-gcc" ) => Command :: CloneGcc ,
76
+ Some ( "fmt" ) => Command :: Fmt ,
73
77
Some ( "--help" ) => {
74
78
usage ( ) ;
75
79
process:: exit ( 0 ) ;
@@ -91,6 +95,7 @@ fn main() {
91
95
Command :: Test => test:: run ( ) ,
92
96
Command :: Info => info:: run ( ) ,
93
97
Command :: CloneGcc => clone_gcc:: run ( ) ,
98
+ Command :: Fmt => fmt:: run ( ) ,
94
99
} {
95
100
eprintln ! ( "Command failed to run: {e}" ) ;
96
101
process:: exit ( 1 ) ;
0 commit comments