Install from source

The major way to get the latest and greatest V, is to install it from source. It is easy, and it usually takes only a few seconds.

Linux, macOS, FreeBSD, etc:

You need git, and a C compiler like tcc, gcc or clang, and make:

  1. git clone https://github.com/vlang/v
  2. cd v
  3. make

See here for how to install the development tools.

Windows:

You need git, and a C compiler like tcc, gcc, clang or msvc:

  1. git clone https://github.com/vlang/v
  2. cd v
  3. make.bat -tcc

NB: You can also pass one of -gcc, -msvc, -clang to make.bat instead, if you do prefer to use a different C compiler, but -tcc is small, fast, and easy to install (V will download a prebuilt binary automatically).

For C compiler downloads and more info, see here.

It is recommended to add this folder to the PATH of your environment variables. This can be done with the command v.exe symlink.

NB: Some antivirus programs (like Symantec) are paranoid about executables with 1 letter names (like v.exe). One possible workaround in that situation is copying v.exe to vlang.exe (so that the copy is newer), or whitelisting the V folder in your antivirus program.

Android

Running V graphical apps on Android is also possible via vab.

V Android dependencies: V, Java JDK >= 8, Android SDK + NDK.

  1. Install dependencies (see vab)
  2. Connect your Android device
  3. Run:
    1. git clone https://github.com/vlang/vab && cd vab && v vab.v
    2. ./vab --device auto run /path/to/v/examples/sokol/particles
    For more details and troubleshooting, please visit the vab GitHub repository.