Simple, fast, safe, compiled language for developing maintainable software. Supports translation from C and (soon) C++.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Delyan Angelov 53c64abdeb compiler: make compiler an ordinary vlib/compiler module 8 hours ago
.github ci: fix ubuntu-gcc 19 hours ago
compiler compiler: make compiler an ordinary vlib/compiler module 8 hours ago
examples compiler: optimize parse_lib_imports (#2319) 17 hours ago
thirdparty glfw: bring back 64 bit glfw3.dll 2 days ago
tools snake_case consts 1 day ago
vlib compiler: make compiler an ordinary vlib/compiler module 8 hours ago
.gitattributes Revert "Delete .gitattributes" 1 month ago
.gitignore array: add filter() method 5 days ago
.travis.yml cc: fix -g 3 days ago
BSDmakefile bootstrap: add BSD makefile 3 weeks ago Fix typo 1 week ago Create 1 week ago Update with workflow example 1 week ago
Dockerfile dockerfile: fix build failure 1 month ago
LICENSE 3 months ago
Makefile makefile: Detect Linux 8 hours ago readme: grammar fix 1 week ago
make.bat make.bat: a better info message 1 day ago
october.plan ci: fix ubuntu-gcc 19 hours ago
september.plan october.plan 1 week ago

The V Programming Language

Build Status Build Status




Discord (primary community):

Installing V:

Key Features of V

  • Simplicity: the language can be learned in less than an hour
  • Fast compilation: ≈100k — 1.2 million loc/s
  • Easy to develop: V compiles itself in less than a second
  • Performance: within 3% of C
  • Safety: no null, no globals, no undefined behavior, immutability by default
  • C to V translation
  • Hot code reloading
  • Powerful UI and graphics libraries
  • Easy cross compilation
  • REPL
  • Built-in ORM
  • C and JavaScript backends

V 1.0 release is planned for December 2019. Right now V is in an alpha stage.

Installing V from source

Linux, macOS, Windows, *BSD, Solaris, WSL, Android, Raspbian

git clone
cd v

That’s it! Now you have a V executable at [path to V repo]/v. [path to V repo] can be anywhere.

V is being constantly updated. To update V, simply run

v up

C compiler

You’ll need Clang or GCC or Visual Studio. If you are doing development, you most likely already have one of those installed.

Otherwise, follow these instructions:


You can create a /usr/local/bin/v symlink so that V is globally available:

sudo ./v symlink


git clone
cd v
docker build -t vlang .
docker run --rm -it vlang:latest

Testing and running the examples

Make sure V can compile itself:

v -o v compiler
$ v
V 0.1.x
Use Ctrl-C or `exit` to exit

>>> println('hello world')
hello world
cd examples
v hello_world.v && ./hello_world    # or simply
v run hello_world.v                 # this builds the program and runs it right away

v word_counter.v && ./word_counter cinderella.txt
v run news_fetcher.v
v run tetris/tetris.v

In order to build Tetris and anything else using the graphics module, you will need to install glfw and freetype libraries.

If you plan to use the http package, you also need to install OpenSSL on non-Windows systems.

brew install glfw freetype openssl

sudo apt install libglfw3 libglfw3-dev libfreetype6-dev libssl-dev

sudo pacman -S glfw-x11 freetype2

sudo dnf install glfw glfw-devel freetype-devel

git clone --depth=1 [path to v repo]/thirdparty/freetype/

glfw dependency will be removed soon.

JavaScript backend


fn main() {
        for i := 0; i < 3; i++ {
                println('Hello from V.js')
v -o hi.js examples/hello_v_js.v && node hi.js
Hello from V.js
Hello from V.js
Hello from V.js



Code structure:

If you introduce a breaking change and rebuild V, you will no longer be able to use V to build itself. So it’s a good idea to make a backup copy of a working compiler executable.