{"id":13441794,"url":"https://github.com/vlang/v","last_synced_at":"2026-01-21T22:06:24.032Z","repository":{"id":37275938,"uuid":"169677297","full_name":"vlang/v","owner":"vlang","description":"Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in \u003c1s with zero library dependencies. Supports automatic C =\u003e V translation. https://vlang.io","archived":false,"fork":false,"pushed_at":"2025-03-03T04:55:35.000Z","size":91141,"stargazers_count":36129,"open_issues_count":974,"forks_count":2173,"subscribers_count":476,"default_branch":"master","last_synced_at":"2025-03-03T05:29:06.152Z","etag":null,"topics":["compiler","language","programming-language","v"],"latest_commit_sha":null,"homepage":"","language":"V","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vlang.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"patreon":"vlang","github":["medvednikov"]}},"created_at":"2019-02-08T02:57:06.000Z","updated_at":"2025-03-03T05:28:32.000Z","dependencies_parsed_at":"2024-11-06T19:18:31.441Z","dependency_job_id":"8d01291f-5b34-46dc-8ac1-bb60cf3ca1f8","html_url":"https://github.com/vlang/v","commit_stats":{"total_commits":16277,"total_committers":766,"mean_commits":21.24934725848564,"dds":0.7752657123548565,"last_synced_commit":"8394b358d837e41127295228401d1ecb41698948"},"previous_names":[],"tags_count":262,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlang%2Fv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlang%2Fv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlang%2Fv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlang%2Fv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vlang","download_url":"https://codeload.github.com/vlang/v/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242099768,"owners_count":20071594,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compiler","language","programming-language","v"],"created_at":"2024-07-31T03:01:38.113Z","updated_at":"2026-01-21T22:06:23.994Z","avatar_url":"https://github.com/vlang.png","language":"V","readme":"\u003cdiv align=\"center\" style=\"display:grid;place-items:center;\"\u003e\n\u003cp\u003e\n    \u003ca href=\"https://vlang.io/\" target=\"_blank\"\u003e\u003cimg width=\"80\" src=\"https://raw.githubusercontent.com/vlang/v-logo/master/dist/v-logo.svg?sanitize=true\" alt=\"V logo\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003ch1\u003eThe V Programming Language\u003c/h1\u003e\n\n[vlang.io](https://vlang.io)\n| [Docs](https://github.com/vlang/v/blob/master/doc/docs.md)\n| [Changelog](https://github.com/vlang/v/blob/master/CHANGELOG.md)\n| [Speed](https://fast.vlang.io/)\n| [Contributing \u0026 compiler design](https://github.com/vlang/v/blob/master/CONTRIBUTING.md)\n\n\u003c/div\u003e\n\u003cdiv align=\"center\" style=\"display:grid;place-items:center;\"\u003e\n\u003c!--\n[![Build Status][WorkflowBadge]][WorkflowUrl]\n--\u003e\n\n[![Sponsor][SponsorBadge]][SponsorUrl]\n[![Patreon][PatreonBadge]][PatreonUrl]\n[![Discord][DiscordBadge]][DiscordUrl]\n[![X][XBadge]][XUrl]\n[![Modules][ModulesBadge]][ModulesUrl]\n\n\u003c/div\u003e\n\n## Key Features of V\n\n- Simplicity: the language can be learned over the course of a weekend\n- Fast compilation: ≈110k loc/s with a Clang backend,\n  ≈500k loc/s with native and tcc backends *(Intel i5-7500, SSD, no\n  optimization)* ([demo video](https://www.youtube.com/watch?v=pvP6wmcl_Sc))\n- Easy to develop: V compiles itself in less than a second\n- Performance: as fast as C (V's main backend compiles to human-readable C)\n- Safety: no null, no globals, no undefined behavior (wip), immutability by default\n- C to V translation ([Translating DOOM demo video](https://www.youtube.com/watch?v=6oXrz3oRoEg))\n- Hot code reloading\n- [Flexible memory management](https://vlang.io/#memory). GC by default, manual via `v -gc none`,\n  arena allocation via `v -prealloc`, autofree via `v -autofree`\n  ([autofree demo video](https://www.youtube.com/watch?v=gmB8ea8uLsM)).\n- [Cross-platform UI library](https://github.com/vlang/ui)\n- Built-in graphics library\n- Easy cross-compilation\n- REPL\n- [Built-in ORM](https://github.com/vlang/v/blob/master/doc/docs.md#orm)\n- [Built-in web framework](https://github.com/vlang/v/blob/master/vlib/veb/README.md)\n- C and JavaScript backends\n- Great for writing low-level software ([Vinix OS](https://github.com/vlang/vinix))\n\n## Stability, future changes, post 1.0 freeze\n\nDespite being at an early development stage, the V language is relatively stable, and doesn't\nchange often. But there will be changes before 1.0.\nMost changes in the syntax are handled via vfmt automatically.\n\nThe V core APIs (primarily the `os` module) will also have minor changes until\nthey are stabilized in V 1.0. Of course, the APIs will grow after that, but without breaking\nexisting code.\n\nAfter the 1.0 release V is going to be in the \"feature freeze\" mode. That means no breaking changes\nin the language, only bug fixes and performance improvements. Similar to Go.\n\nWill there be V 2.0? Not within a decade after 1.0, perhaps not ever.\n\nTo sum it up, unlike many other languages, V is not going to be always changing, with new features\nintroduced and old features modified. It is always going to be a small and simple\nlanguage, very similar to the way it is right now.\n\n## Installing V from source\n\n--\u003e **_(this is the preferred method)_**\n\n### Linux, macOS, Windows, \\*BSD, Solaris, WSL, etc.\n\nUsually, installing V is quite simple if you have an environment that already has a\nfunctional `git` installation.\n\nNote: On Windows, run `make.bat` instead of `make` in CMD, or `./make.bat` in PowerShell.\nNote: On Ubuntu/Debian, you may need to run `sudo apt install git build-essential make` first.\n\nTo get started, execute the following in your terminal/shell:\n```bash\ngit clone --depth=1 https://github.com/vlang/v\ncd v\nmake\n```\n\nThat should be it, and you should find your V executable at `[path to V repo]/v`.\n`[path to V repo]` can be anywhere.\n\n(Like the note above says, on Windows, use `make.bat`, instead of `make`.)\n\nNow try running `./v run examples/hello_world.v` (or `v run examples/hello_world.v` in cmd shell).\n\n- *Trouble? Please see the notes above, and link to\n  [Installation Issues](https://github.com/vlang/v/discussions/categories/installation-issues)\n  for help.*\n\nNote: V is being constantly updated. To update V to its latest version, simply run:\n\n```bash\nv up\n```\n\n\u003e [!NOTE]\n\u003e If you run into any trouble, or you have a different operating\n\u003e system or Linux distribution that doesn't install or work immediately, please see\n\u003e [Installation Issues](https://github.com/vlang/v/discussions/categories/installation-issues)\n\u003e and search for your OS and problem.\n\u003e\n\u003e If you can't find your problem, please add it to an existing discussion if one exists for\n\u003e your OS, or create a new one if a main discussion doesn't yet exist for your OS.\n\n### C compiler\n\nThe [Tiny C Compiler (tcc)](https://repo.or.cz/w/tinycc.git) is downloaded for you by `make` if\nthere is a compatible version for your system, and installed under the V `thirdparty` directory.\n\nThis compiler is very fast, but does almost no optimizations. It is best for development builds.\n\nFor production builds (using the `-prod` option to V), it's recommended to use clang, gcc, or\nMicrosoft Visual C++. If you are doing development, you most likely already have one of those\ninstalled.\n\nOtherwise, follow these instructions:\n\n- [Installing a C compiler on Linux and macOS](https://github.com/vlang/v/wiki/Installing-a-C-compiler-on-Linux-and-macOS)\n\n- [Installing a C compiler on Windows](https://github.com/vlang/v/wiki/Installing-a-C-compiler-on-Windows)\n\n### Symlinking\n\n\u003e [!NOTE]\n\u003e It is *highly recommended*, that you put V on your PATH. That saves\n\u003e you the effort to type in the full path to your v executable every time.\n\u003e V provides a convenience `v symlink` command to do that more easily.\n\nOn Unix systems, it creates a `/usr/local/bin/v` symlink to your\nexecutable. To do that, run:\n\n```bash\nsudo ./v symlink\n```\n\nOn Windows, start a new shell with administrative privileges, for example by pressing the\n\u003ckbd\u003eWindows Key\u003c/kbd\u003e, then type `cmd.exe`, right-click on its menu entry, and choose `Run as\nadministrator`. In the new administrative shell, cd to the path where you have compiled V, then\ntype:\n\n```bat\nv symlink\n```\n\n(or `./v symlink` in PowerShell)\n\nThat will make V available everywhere, by adding it to your PATH. Please restart your\nshell/editor after that, so that it can pick up the new PATH variable.\n\n\u003e [!NOTE]\n\u003e There is no need to run `v symlink` more than once - v will still be available, even after\n\u003e `v up`, restarts, and so on. You only need to run it again if you decide to move the V repo\n\u003e folder somewhere else.\n\n### Void Linux\n\n\u003cdetails\u003e\u003csummary\u003eExpand Void Linux instructions\u003c/summary\u003e\n\n```bash\n# xbps-install -Su base-devel\n# xbps-install libatomic-devel\n$ git clone --depth=1 https://github.com/vlang/v\n$ cd v\n$ make\n```\n\n\u003c/details\u003e\n\n### Docker\n\n\n```bash\ngit clone --depth=1 https://github.com/vlang/v\ncd v\ndocker build -t vlang .\ndocker run --rm -it vlang:latest\n```\n\n### Docker with Alpine/musl\n\n```bash\ngit clone --depth=1 https://github.com/vlang/v\ncd v\ndocker build -t vlang_alpine - \u003c Dockerfile.alpine\nalias with_alpine='docker run -u 1000:1000 --rm -it -v .:/src -w /src vlang_alpine:latest'\n```\n\nCompiling *static* executables, ready to be copied to a server, that is running\nanother linux distro, without dependencies:\n```bash\nwith_alpine v -skip-unused -prod -cc gcc -cflags -static -compress examples/http_server.v\nwith_alpine v -skip-unused -prod -cc gcc -cflags -static -compress -gc none examples/hello_world.v\nls -la examples/http_server examples/hello_world\nfile   examples/http_server examples/hello_world\nexamples/http_server: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, no section header\nexamples/hello_world: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, no section header\n```\n\nYou should see something like this:\n```\n-rwxr-xr-x 1 root root  16612 May 27 17:07 examples/hello_world\n-rwxr-xr-x 1 root root 335308 May 27 17:07 examples/http_server\n```\n\n### Termux/Android\n\nOn Termux, V needs some packages preinstalled - a working C compiler, also `libexecinfo`,\n`libgc` and `libgc-static`. After installing them, you can use the same script, like on\nLinux/macos:\n\n```bash\npkg install clang libexecinfo libgc libgc-static make git\ngit clone --depth=1 https://github.com/vlang/v\ncd v\nmake\n```\n\n## Editor/IDE Plugins\n\nTo bring IDE functions for the V programming languages to your editor, check out\n[v-analyzer](https://github.com/vlang/v-analyzer). It provides a\n[VS Code extension](https://marketplace.visualstudio.com/items?itemName=VOSCA.vscode-v-analyzer)\nand language server capabilities for other editors.\n\nThe plugin for JetBrains IDEs (IntelliJ, CLion, GoLand, etc.) also offers a great development\nexperience with V. You can find all features in [its documentation](https://plugins.jetbrains.com/plugin/20287-vlang/docs/syntax-highlighting.html).\n\nOther Plugins:\n\n- [Vim plugins](https://github.com/vlang/awesome-v#vim)\n- [Emacs plugins](https://github.com/vlang/awesome-v#emacs)\n- [Sublime Text 3 plugins](https://github.com/vlang/awesome-v#sublime-text-3)\n- [Atom plugins](https://github.com/vlang/awesome-v#atom)\n\n## Testing and running the examples\n\nMake sure V can compile itself:\n\n```bash\n$ v self\n$ v\nV 0.3.x\nUse Ctrl-C or `exit` to exit\n\n\u003e\u003e\u003e println('hello world')\nhello world\n\u003e\u003e\u003e\n```\n\n```bash\ncd examples\nv hello_world.v \u0026\u0026 ./hello_world    # or simply\nv run hello_world.v                 # this builds the program and runs it right away\n\nv run word_counter/word_counter.v word_counter/cinderella.txt\nv run news_fetcher.v\nv run tetris/tetris.v\n```\n\n\n\u003cimg src='https://raw.githubusercontent.com/vlang/v/master/examples/tetris/screenshot.png' width=300 alt='tetris screenshot'\u003e\n\n## Sokol and GG GUI apps/games:\n\nIn order to build Tetris or 2048 (or anything else using the `sokol` or `gg` graphics modules),\nyou will need to install additional development libraries for your system.\n\n| System              | Installation method                                                                                |\n|---------------------|----------------------------------------------------------------------------------------------------|\n| Debian/Ubuntu based | Run `sudo apt install libxi-dev libxcursor-dev libgl-dev libxrandr-dev libasound2-dev`             |\n| Fedora/RH/CentOS    | Run `sudo dnf install libXi-devel libXcursor-devel libX11-devel libXrandr-devel libglvnd-devel`    |\n|                     |                                                                                                    |\n| NixOS               | Add `xorg.libX11.dev xorg.libXcursor.dev xorg.libXi.dev xorg.libXrandr.dev libGL.dev` to           |\n|                     | to `environment.systemPackages`                                                                    |\n\n## V net.http, net.websocket, `v install`\n\nThe net.http module, the net.websocket module, and the `v install` command may all use SSL.\nV comes with a version of mbedtls, which should work on all systems. If you find a need to\nuse OpenSSL instead, you will need to make sure that it is installed on your system, then\nuse the `-d use_openssl` switch when you compile.\n\nNote: Mbed-TLS is smaller and easier to install on windows too (V comes with it), but if you\nwrite programs, that do lots of http requests to HTTPS/SSL servers, in most cases, it is *best*\nto compile with `-d use_openssl`, and do so on a system, where you do have OpenSSL installed\n(see below). Mbed-TLS is slower, and can have more issues, especially when you are doing parallel\nhttp requests to multiple hosts (for example in web scrapers, REST API clients, RSS readers, etc).\nOn windows, it is better to run such programs in WSL2.\n\nTo install OpenSSL on non-Windows systems:\n\n| System              | Installation command             |\n|---------------------|----------------------------------|\n| macOS               | `brew install openssl`           |\n| Debian/Ubuntu based | `sudo apt install libssl-dev`    |\n| Arch/Manjaro        | openssl is installed by default  |\n| Fedora/CentOS/RH    | `sudo dnf install openssl-devel` |\n\nOn Windows, OpenSSL is simply hard to get working correctly. The instructions\n[here](https://tecadmin.net/install-openssl-on-windows/) may (or may not) help.\n\n## V sync\n\nV's `sync` module and channel implementation uses libatomic.\nIt is most likely already installed on your system, but if not,\nyou can install it, by doing the following:\n\n| System              | Installation command                |\n|---------------------|-------------------------------------|\n| macOS               | already installed                   |\n| Debian/Ubuntu based | `sudo apt install libatomic1`       |\n| Fedora/CentOS/RH    | `sudo dnf install libatomic-static` |\n\n## V UI\n\n\u003ca href=\"https://github.com/vlang/ui\"\u003e\n\u003cimg src='https://raw.githubusercontent.com/vlang/ui/master/examples/screenshot.png' width=712 alt='V UI example screenshot'\u003e\n\u003c/a\u003e\n\nhttps://github.com/vlang/ui\n\n\u003c!---\n## JavaScript backend\n\n[examples/js_hello_world.v](examples/js_hello_world.v):\n\n```v\nfn main() {\n\tfor i in 0 .. 3 {\n\t\tprintln('Hello from V.js')\n\t}\n}\n```\n\n```bash\nv -o hi.js examples/js_hello_world.v \u0026\u0026 node hi.js\nHello from V.js\nHello from V.js\nHello from V.js\n```\n--\u003e\n\n## Android graphical apps\n\nWith V's `vab` tool, building V UI and graphical apps for Android can become as easy as:\n\n```\n./vab /path/to/v/examples/2048\n```\n\n[https://github.com/vlang/vab](https://github.com/vlang/vab).\n\u003cimg src=\"https://user-images.githubusercontent.com/768942/107622846-c13f3900-6c58-11eb-8a66-55db12979b73.png\" alt=\"vab examples screenshot\"\u003e\n\n## Developing web applications\n\nCheck out the\n[Building a simple web blog](https://github.com/vlang/v/blob/master/tutorials/building_a_simple_web_blog_with_veb/README.md)\ntutorial and Gitly, a light and fast alternative to GitHub/GitLab:\n\nhttps://github.com/vlang/gitly\n\n\u003cimg src=\"https://user-images.githubusercontent.com/687996/85933714-b195fe80-b8da-11ea-9ddd-09cadc2103e4.png\" alt=\"gitly screenshot\"\u003e\n\n## Vinix, an OS/kernel written in V\n\nV is great for writing low-level software like drivers and kernels.\nVinix is an OS/kernel that already runs bash, GCC, V, and nano.\n\nhttps://github.com/vlang/vinix\n\n\u003cimg src=\"https://github.com/vlang/vinix/blob/main/screenshot0.png?raw=true\" alt=\"vinix screenshot 1\"\u003e\n\u003cimg src=\"https://github.com/vlang/vinix/blob/main/screenshot1.png?raw=true\" alt=\"vinix screenshot 2\"\u003e\n\n## Acknowledgement\n\nV thanks Fabrice Bellard for his original work on the\n[TCC - Tiny C Compiler](https://bellard.org/tcc/).\nNote the TCC website is old; the current TCC repository can be found\n[here](https://repo.or.cz/w/tinycc.git).\nV utilizes pre-built TCC binaries located at\n[https://github.com/vlang/tccbin/](https://github.com/vlang/tccbin/).\n\n## Troubleshooting\n\nPlease see the\n[Troubleshooting](https://github.com/vlang/v/wiki/Troubleshooting)\nsection on our\n[wiki page](https://github.com/vlang/v/wiki).\n\n[WorkflowBadge]: https://github.com/vlang/v/workflows/CI/badge.svg\n[DiscordBadge]: https://img.shields.io/discord/592103645835821068?label=Discord\u0026logo=discord\u0026logoColor=white\n[PatreonBadge]: https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.vercel.app%2Fapi%3Fusername%3Dvlang%26type%3Dpatrons\u0026style=flat\n[SponsorBadge]: https://img.shields.io/github/sponsors/medvednikov?style=flat\u0026logo=github\u0026logoColor=white\n[XBadge]: https://img.shields.io/badge/follow-%40v__language-1DA1F2?logo=x\u0026style=flat\u0026logoColor=white\n[ModulesBadge]: https://img.shields.io/badge/modules-reference-027d9c?logo=v\u0026logoColor=white\u0026logoWidth=10\n\n[WorkflowUrl]: https://github.com/vlang/v/commits/master\n[DiscordUrl]: https://discord.gg/vlang\n[PatreonUrl]: https://patreon.com/vlang\n[SponsorUrl]: https://github.com/sponsors/medvednikov\n[XUrl]: https://x.com/v_language\n[ModulesUrl]: https://modules.vlang.io\n","funding_links":["https://patreon.com/vlang","https://github.com/sponsors/medvednikov"],"categories":["HarmonyOS","V","开源类库","Development","By Language","Open source library","Golang","语言资源库","其他","Uncategorized","language","v","V Language Server (VLS)","Scripting","Applications","Языки программирования","\u003ca name=\"V\"\u003e\u003c/a\u003eV"],"sub_categories":["Windows Manager","解释器","Programming","Other","Interpreter","v","网络服务_其他","Uncategorized","Interpreters/Compilers"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvlang%2Fv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvlang%2Fv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvlang%2Fv/lists"}