• Source code
Documentation
Search results...
Introduction
Installing V from source
Upgrading V to latest version
Packaging V for distribution
Getting started
Hello World
Running a project folder with several files
Comments
Functions
Hoisting
Returning multiple values
Symbol visibility
Variables
Mutable variables
Initialization vs assignment
Warnings and declaration errors
V Types
Primitive types
Strings
Runes
Numbers
Arrays
Fixed size arrays
Maps
Map update syntax
Module imports
Selective imports
Module hierarchy
Module import aliasing
Statements & expressions
If
Match
In operator
For loop
Defer
Goto
Structs
Heap structs
Default field values
Required fields
Short struct literal syntax
Struct update syntax
Trailing struct literal arguments
Access modifiers
Anonymous structs
Static type methods
[noinit] structs
Methods
Embedded structs
Unions
Functions 2
Immutable function args by default
Mutable arguments
Variable number of arguments
Anonymous & higher order functions
Closures
Parameter evaluation order
References
Constants
Required module prefix
Builtin functions
println
Printing custom types
Dumping expressions at runtime
Modules
Create modules
Special considerations for project folders
init functions
cleanup functions
Type Declarations
Type aliases
Enums
Function Types
Interfaces
Sum types
Option/Result types and error handling
Custom error types
Generics
Concurrency
Spawning Concurrent Tasks
Channels
Shared Objects
JSON
Decoding JSON
Encoding JSON
Testing
Asserts
Asserts with an extra message
Asserts that do not abort your program
Test files
Running tests
Memory management
Control
Stack and Heap
ORM
Writing Documentation
Newlines in Documentation Comments
Tools
v fmt
v shader
Profiling
Package management
Package commands
Publish package
Attributes
Conditional compilation
Compile time pseudo variables
Compile time reflection
Compile time code
Compile time types
Environment specific files
Debugger
Call stack
Trace
Memory-unsafe code
Structs with reference fields
sizeof and __offsetof
Limited operator overloading
Implicitly generated overloads
Restriction
Performance tuning
Tuning operations details
Atomics
Global Variables
Static Variables
Cross compilation
Debugging
C Backend binaries (Default)
Native Backend binaries
Javascript Backend
V and C
Calling C from V
Calling V from C
Passing C compilation flags
pkgconfig
Including C code
C types
C Declarations
Export to shared library
Translating C to V
Working around C issues
Other V Features
Inline assembly
Hot code reloading
Cross-platform shell scripts in V
Vsh scripts with no extension
Appendix I: Keywords
Appendix II: Operators
Other online resources
V contributing guide
V language documentation
V standard module documentation
V online playground
Awesome V
The V language Discord

Packaging V for distribution

See the notes on how to prepare a package for V .

Edit this page on GitHub
Last updated: 2025-03-12 22:05:16, V Commit: 951d304
Previous page Upgrading V to latest version
Next page Getting started