@@ -5,6 +5,7 @@ mod build;
55mod clean;
66mod clone_gcc;
77mod config;
8+ mod fmt;
89mod info;
910mod prepare;
1011mod rust_tools;
@@ -41,7 +42,8 @@ Commands:
4142 build : Compiles the project.
4243 test : Runs tests for the project.
4344 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"
4547 ) ;
4648}
4749
@@ -54,6 +56,7 @@ pub enum Command {
5456 Rustc ,
5557 Test ,
5658 Info ,
59+ Fmt ,
5760}
5861
5962fn main ( ) {
@@ -70,6 +73,7 @@ fn main() {
7073 Some ( "test" ) => Command :: Test ,
7174 Some ( "info" ) => Command :: Info ,
7275 Some ( "clone-gcc" ) => Command :: CloneGcc ,
76+ Some ( "fmt" ) => Command :: Fmt ,
7377 Some ( "--help" ) => {
7478 usage ( ) ;
7579 process:: exit ( 0 ) ;
@@ -91,6 +95,7 @@ fn main() {
9195 Command :: Test => test:: run ( ) ,
9296 Command :: Info => info:: run ( ) ,
9397 Command :: CloneGcc => clone_gcc:: run ( ) ,
98+ Command :: Fmt => fmt:: run ( ) ,
9499 } {
95100 eprintln ! ( "Command failed to run: {e}" ) ;
96101 process:: exit ( 1 ) ;
0 commit comments