| Crates.io | codesim |
| lib.rs | codesim |
| version | 0.1.2 |
| created_at | 2021-12-19 12:10:53.910197+00 |
| updated_at | 2021-12-24 13:45:50.699928+00 |
| description | Diff two single C++ code file. |
| homepage | https://github.com/yjl9903/Codesim |
| repository | https://github.com/yjl9903/Codesim |
| max_upload_size | |
| id | 500370 |
| size | 315,297 |
Diff two single C++ code file.
Ensure you have installed clang in your computer, and corresponding nm, objdump has been properly set in your path env.
Run the following in your terminal.
curl -fsSL https://bina.egoist.sh/yjl9903/Codesim | sh
Or you can manually install codesim. Get the latest Rust.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Install codesim with cargo.
cargo install codesim
Install codesim locally.
cargo install --path .
Mac OS / Linux is highly recommended.
$ codesim --help
codesim 0.1.0
Diff two single C++ code file
USAGE:
codesim [FLAGS] [OPTIONS] [--] [ARGS]
FLAGS:
-h, --help Prints help information
--norm Normalize final score
--skip-compile Skip compile
-V, --version Prints version information
-v, --verbose Verbose log
OPTIONS:
--csv <csv> Output CSV
--files <files>... extra files
ARGS:
<code1> source code
<code2> target code
For example, run codesim on the example codes.
codesim examples/aplusb.cpp examples/cplusd.cpp
codesim examples/cplusd.cpp examples/aplusb.cpp
If you have not installed clang, you can compile two codes manually, and pass --skip-compile to codesim.
codesim a.out b.out --skip-compile
You can also run codesim on multiple files pairwise.
codesim --files examples/Sum/sample1.c examples/Sum/sample2.c examples/Sum/sample3.c
Dockerfile is provided. You can use it to avoid installing deps in your machine.