XCODX |

V Online Compiler & Interpreter

Select Language
Online Code Compiler
Full HTML IDE
Py main.py
Program Output Ready
  Welcome to XCODX Online Compiler

  Quick Start:
  Ctrl+Enter  Run code
  Ctrl+S      Save / Download
  Ctrl+L      Clear output

  Select a language and start coding.
Success
Operation completed

About V

V, also written vlang, is a statically typed compiled language created by Alexander Medvednikov and first released in 2019. It aims for a small, readable syntax and very fast compilation, and it works by translating your code to C before producing a native binary. The language leans on safety defaults — variables are immutable unless you mark them otherwise, there are no null references in the usual sense, and safe code avoids undefined behavior. V is young and still pre-1.0, so its standard library, called vlib, and some language details continue to change between releases. On XCODX you can try V's syntax and vlib directly, compiling and running in the browser with no local setup.

Hello World in V

import os

fn main() {
	name := os.input('Enter your name: ')
	println('Hello, ${name}!')
	for i in 1 .. 6 {
		println('${i} squared is ${i * i}')
	}
}

When to use V

V targets developers who want Go-like simplicity and fast builds with a compiled, C-backed binary — command-line utilities, small services, and tooling are typical uses, and its automatic C interop and C-translation features help when wrapping existing libraries. Choose it when quick compilation and a minimal, opinionated syntax appeal to you. Because the language is still pre-1.0, expect some rough edges and shifting APIs. It is a poor fit for production systems that need long-term stability today, and on XCODX modules outside vlib cannot be installed, since there is no package fetching or network access.

Common questions

Can I install external modules with v install here?

No. The sandbox provides only the bundled vlib standard library — there is no `v install`, no VPM access, no network, and no persistent filesystem, so third-party modules are unavailable. Import only modules that ship with V, such as `os`, `math`, or `strings`.

How do I read user input in V?

The simplest way is `os.input('prompt: ')`, which prints the prompt and returns the typed line as a string; `os.get_line()` reads a line without a prompt. In the live terminal the program waits for you to type and press Enter, or you can supply the Stdin Box, and Ctrl+D closes the stream. Import the `os` module first.

Is V production ready in 2026?

V is still pre-1.0 — recent releases sit in the 0.5 range — so while it is usable and actively developed, its standard library and some language features are still changing. Treat code as potentially needing updates across versions, and check the runtime badge for the exact version running here.

Does V really have no null and no undefined behavior?

By design V avoids null references, using option and result types instead, and disallows undefined behavior in safe code, alongside defaults like immutable variables. Some low-level escapes exist behind `unsafe`, but everyday code stays inside the safe subset.

Why does V compile so fast?

V generates C and keeps the language deliberately small, which together make builds quick even for larger programs. In the sandbox you still see a short compile step before your program runs, plus the overall run timeout.

Can V make network requests or save files on XCODX?

No. Each run is isolated with no outbound network and no disk that persists between executions, so HTTP calls and saved files will not behave as they would locally. Use stdin for input and stdout for output within a single run.

How V runs on XCODX

Sandbox filename
main.v
Entry point
single main source file
Editor grammar
go
Reading stdin
os.input()
Input delivery
live WebSocket stream
Prompt flushing
flush manually before reading input
Compile limit
10 s
Run limit
3 s batch · up to 3 min live
Memory
256 MB per stage
Max source
50,000 characters

Default program on this page

fn main() {
    println('Hello from V!')
    println('Welcome to XCODX Online Compiler!')
}