commandline compiler explorer - use https://godbolt.org from your terminal!
commandline compiler explorer - use https://godbolt.org from your terminal!
Do you love Compiler Explorer? Do you like the command line? Well this is the tool for you!
With a valid rust toolchain (I like rustup.rs) you can just
cargo install cce
And you will have a globally available cce binary available.
With a valid rust toolchain (I like rustup.rs) you can just
cargo build --release
And the binary should be located at ./target/release/cce
cce has 3 main operations:
~> cce list langs
c++
cppx
assembly
cuda
llvm
d
ispc
analysis
c
rust
go
pascal
haskell
swift
…
You can also pass a language as a filter to listing compilers:
…
Finally, once you know the compiler id you would like to use, you can compile, passing arguments after --:
~> cce compile arm64g630 -- -O3
Compiling with arm64g630 compiler outputs:
main:
mov w0, 1
ret
You can also pass a file after the compiler ID:
~> cce compile g81 test.c
Compiling with g81 compiler outputs:
main:
mov eax, 1
ret
And you can also get an URL for the compilation job:
…
The full help listing:
cce - a command line interface to compiler explorer 0.1.0
Ethan Smith
Input C++, C, Rust, Haskell, Swift, etc, get assembly
USAGE:
cce [OPTIONS]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
--host specify the Compiler Explorer host [default: https://godbolt.org]
SUBCOMMANDS:
compile Compile a snippet on compiler explorer
help Prints this message or the help of the given subcommand(s)
list List the compilers and languages available on compiler explorer
This project is under the MIT license. By contributing, you agree to license your work under the MIT license. See LICENSE for more.
No open issues yet, or sync has not completed.