Files
compiler-explorer/lib/compilers/_all.ts
T
chibitanaka 86f439fc92 Add Vyper support (#7088)
Hello! I'm a big fan of Godbolt and use it regularly to test gas
optimizations in Solidity. However, to this day, there is no support for
Vyper, the second most popular language targeting the EVM, related issue
#4165. We at Statemind.io thought that adding Vyper support would
greatly benefit developers and security researchers, so here is our
attempt to get it working :)

This PR **is not ready** for merging, as `vyper.defaults.properties` and
`vyper.amazon.properties` are not yet defined. I have a few questions to
clarify how to integrate it on the public instance and infrastructure
repository:

Because Vyper compiler is basically a python module, I've found success
in testing multiple versions via separate `venv` environments. In my
local tests `vyper.local.properties` was the following:
```INI
compilers=vyper
compilerType=vyper

versionFlag=--version

compiler.vyper.exe=/opt/research/godbolt/venv/bin/vyper
compiler.vyper.isSemVer=true
compiler.vyper.instructionSet=evm
compiler.vyper.options=--optimize none
```

The versions tested are the latest major Vyper release 0.4.0, along with
0.3.10 and earlier 0.3.xx releases.

It appears that there is support for running python in a virtual
environment in the infra repository:

https://github.com/compiler-explorer/infra/blob/main/bin/lib/installable/python.py

However, I've had difficulties getting started with it and would greatly
appreciate any assistance. Thank you!
2024-11-26 16:38:40 -06:00

156 lines
6.8 KiB
TypeScript

// Copyright (c) 2021, Compiler Explorer Authors
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
export {AdaCompiler} from './ada.js';
export {AnalysisTool} from './analysis-tool.js';
export {AssemblyCompiler} from './assembly.js';
export {AvrGcc6502Compiler} from './avrgcc6502.js';
export {BeebAsmCompiler} from './beebasm.js';
export {C3Compiler} from './c3c.js';
export {CarbonCompiler} from './carbon.js';
export {CerberusCompiler} from './cerberus.js';
export {Cc65Compiler} from './cc65.js';
export {CircleCompiler} from './circle.js';
export {CIRCTCompiler} from './circt.js';
export {CL430Compiler} from './cl430.js';
export {ClangCompiler} from './clang.js';
export {ClangCLCompiler} from './clangcl.js';
export {ClangCudaCompiler} from './clang.js';
export {ClangHipCompiler} from './clang.js';
export {ClangIntelCompiler} from './clang.js';
export {ClangHexagonCompiler} from './clang.js';
export {ClangDxcCompiler} from './clang.js';
export {CleanCompiler} from './clean.js';
export {CMakeScriptCompiler} from './cmakescript.js';
export {CompCertCompiler} from './compcert.js';
export {CppFrontCompiler} from './cppfront.js';
export {CprocCompiler} from './cproc.js';
export {CLSPVCompiler} from './clspv.js';
export {CrystalCompiler} from './crystal.js';
export {D8Compiler} from './d8.js';
export {DartCompiler} from './dart.js';
export {DefaultCompiler} from './default.js';
export {Dex2OatCompiler} from './dex2oat.js';
export {DMDCompiler} from './dmd.js';
export {
DotNetCoreClrCompiler,
DotNetCrossgen2Compiler,
DotNetIlDasmCompiler,
DotNetIlSpyCompiler,
DotNetLegacyCompiler,
DotNetMonoCompiler,
DotNetNativeAotCompiler,
} from './dotnet.js';
export {EDGCompiler} from './edg.js';
export {EllccCompiler} from './ellcc.js';
export {ElixirCompiler} from './elixir.js';
export {ErlangCompiler} from './erlang.js';
export {ErlangAsmCompiler} from './erlangasm.js';
export {EWARMCompiler} from './ewarm.js';
export {EWAVRCompiler} from './ewavr.js';
export {FakeCompiler} from './fake-for-test.js';
export {FlangCompiler} from './flang.js';
export {FlangFC1Compiler} from './flang-fc1.js';
export {FortranCompiler} from './fortran.js';
export {FPCCompiler} from './pascal.js';
export {GCCCompiler} from './gcc.js';
export {GCCRSCompiler} from './gccrs.js';
export {GCCGimpleCompiler} from './gimple.js';
export {GCCCobolCompiler} from './gcccobol.js';
export {GLSLCompiler} from './glsl.js';
export {GnuCobolCompiler} from './gnucobol.js';
export {GolangCompiler} from './golang.js';
export {HaskellCompiler} from './haskell.js';
export {HLSLCompiler} from './hlsl.js';
export {HookCompiler} from './hook.js';
export {HyloCompiler} from './hylo.js';
export {ISPCCompiler} from './ispc.js';
export {JaktCompiler} from './jakt.js';
export {JavaCompiler} from './java.js';
export {JuliaCompiler} from './julia.js';
export {KotlinCompiler} from './kotlin.js';
export {LDCCompiler} from './ldc.js';
export {LLCCompiler} from './llc.js';
export {YLCCompiler} from './ylc.js';
export {LLVMmcaTool} from './llvm-mca.js';
export {LLVMMOSCompiler} from './llvm-mos.js';
export {MadPascalCompiler} from './madpascal.js';
export {MovfuscatorCompiler} from './movfuscator.js';
export {MLIRCompiler} from './mlir.js';
export {GM2Compiler} from './gm2.js';
export {MrustcCompiler} from './mrustc.js';
export {SnowballCompiler} from './snowball.js';
export {NasmCompiler} from './nasm.js';
export {NimCompiler} from './nim.js';
export {NvccCompiler} from './nvcc.js';
export {NvrtcCompiler} from './nvrtc.js';
export {NvcppCompiler} from './nvcpp.js';
export {OCamlCompiler} from './ocaml.js';
export {OptCompiler} from './opt.js';
export {OSACATool} from './osaca.js';
export {PascalWinCompiler} from './pascal-win.js';
export {PonyCompiler} from './pony.js';
export {PPCICompiler} from './ppci.js';
export {PtxAssembler} from './ptxas.js';
export {PythonCompiler} from './python.js';
export {PythranCompiler} from './pythran.js';
export {R8Compiler} from './r8.js';
export {RacketCompiler} from './racket.js';
export {RGACompiler} from './rga.js';
export {RubyCompiler} from './ruby.js';
export {RustcCgGCCCompiler} from './rustc-cg-gcc.js';
export {RustCompiler} from './rust.js';
export {ScalaCompiler} from './scala.js';
export {SdccCompiler} from './sdcc.js';
export {SolidityCompiler} from './solidity.js';
export {SolidityZKsyncCompiler} from './solidity-zksync.js';
export {SpiceCompiler} from './spice.js';
export {SPIRVCompiler} from './spirv.js';
export {SPIRVToolsCompiler} from './spirv-tools.js';
export {SwiftCompiler} from './swift.js';
export {TableGenCompiler} from './tablegen.js';
export {TenDRACompiler} from './tendra.js';
export {TIC2000} from './tic2000.js';
export {TinyCCompiler} from './tinyc.js';
export {ToitCompiler} from './toit.js';
export {TurboCCompiler} from './turboc.js';
export {TypeScriptNativeCompiler} from './typescript-native.js';
export {VCompiler} from './v.js';
export {ValaCompiler} from './vala.js';
export {VyperCompiler} from './vyper.js';
export {V8Compiler} from './v8.js';
export {Win32Compiler} from './win32.js';
export {Win32Vc6Compiler} from './win32-vc6.js';
export {Win32VcCompiler} from './win32-vc.js';
export {Win32MingWGcc} from './win32-mingw-gcc.js';
export {Win32MingWClang} from './win32-mingw-clang.js';
export {WineVcCompiler} from './wine-vc.js';
export {WslVcCompiler} from './wsl-vc.js';
export {WyrmCompiler} from './wyrm.js';
export {WasmtimeCompiler} from './wasmtime.js';
export {ZigCC} from './zigcc.js';
export {ZigCompiler} from './zig.js';
export {ZigCXX} from './zigcxx.js';
export {z88dkCompiler} from './z88dk.js';