Pretend as if something is compiling or busying in your terminal.
Run over a directory: fake-compiler run -d path_to_compile -C compiler_type
-Coption: specify the compiler type, i,e howfake-compilerinterprets the given directorypath_to_compile- Supported compiler type:
cxxandcargocxx:fake-compilerwill iterate through the whole directory and print cmake style compiling logs of all files with.cpp/.c/.Sextensioncargo:fake-compilerwill parseCargo.tomlandCargo.lockwithin directory root, resolving dependency graph and printing cargo style compiling logs
Or run with a config file: fake-compiler run -c config_file
- The config file contains parsed result of some directory. It has specific format, you should generate it by
gensubcommand - Actually it is equivalent to
-doption, except thatfake-compilernow no longer needs to explicitly parse the directory everytime
Optional flag: -t threads: specify the number of threads, default: 16
- Since
fake-compilerdoes not actually do the compiling stuff, this flag essentially specifies how many threads are sleeping at the same time
Optional flag: -p bar: specify the style of progress bar/compiling logs
- YES, you can specify this. Each compiler has its own default progress bar, but you can explicitly specify others
- Supported progress bar: same as supported compiler type, i,e
cxxandcargo - This option only affects how the interpreted content is printed, it does not affect how to interpret the given directory
You can generate config file by fake-compiler gen -C compiler_type -d path_to_compile -o output_file
- The generated file is bound to how specified compiler interprets the directory
This repository is shipped with two example config files, placed at examples/ directory:
examples/linux-6.12.17_cxx: linux 6.12.17 source codeexamples/router_cargo: Apollo Router Core
Try it out (need Go environment): go run . run -c examples/linux-6.12.17_cxx
- Setup Go environment, minimal version required: 1.23.0
- Run
make build

