Thanks for using Compiler Explorer
C++
LLVM IR
MLIR
Cppx
Cppx-Gold
Cppx-Blue
C
OpenCL C
C++ for OpenCL
Rust
D
Erlang
Go
ispc
Haskell
Java
Kotlin
Scala
OCaml
Python
Swift
Pascal
Fortran
Assembly
Analysis
CUDA C++
Zig
Clean
Ada
Nim
Crystal
C++ (Circle)
Ruby
CMake
C#
F#
Visual Basic
Dart
TypeScript Native
Solidity
rust source #1
Output
Compile to binary
Execute the code
Intel asm syntax
Demangle identifiers
Filters
Unused labels
Library functions
Directives
Comments
Horizontal whitespace
Compiler
gcrs-13.1.0a
Options
Source code
// Type your code here, or load an example. pub fn square(num: i32) -> i32 { num * num } // If you use `main()`, declare it as `pub` to see it in the output: // pub fn main() { ... }
Become a Patron
Sponsor on GitHub
Donate via PayPal
Source on GitHub
Mailing list
Installed libraries
Wiki
Report an issue
How it works
Contact the author
About the author
Changelog
Version tree