Skip to content

Getting Started

solar-mist edited this page May 9, 2024 · 9 revisions

Installation

A brief guide on how to install the viper compiler

Dependencies required

  • Any C++ compiler that supports C++20
  • CMake

Installing

  1. Clone the GitHub repository
git clone https://github.com/viper-org/viper-lang
  1. Build the Viper compiler by running
cmake .
cmake --build .


Note

If the build is taking a long time, you may use the -j flag to use multiple cores when compiling. It is recommended to use -j{Number of threads on your system + 2} for the fastest build.

Guide

A simple viper program looks like this:

func @main() -> i32 {
    return 0;
}
Clone this wiki locally