9 Mar 2026
-new-generic-solver) (#26280)${expr} (#26494)foo()? == foo where foo returns !string (fix #26383) (#26403)@VCURRENTHASH for V build/bootstrapped outside of a Git repository (fix #26407) (#26426)fn f(x u8) {} f(999) (fix #26584) (fix #26585) (#26586)[3]!int{} (fix #26244) (#26249)[T] as fn return type (#26530)pub: not being detected in structs in -vls-mode (#26581)-cc gcc -prod to avoid the need for the
-cflags -fno-inline-small-functions workaround with gcc > 12.0 (fix #26512) (#26552)*?, +?, ?? (fix #26579) (#26582)strict: true mode for x.json2.decode(), that rejects string-to-number type
casting during decoding (fix #26082) (#26220)io.string_reader module (not used in vlib, with confusing and under
tested/documented API - see #25713 ) (#26274)draw_rounded_rect_filled function (#26390)@[json: name] attr support for enum values (fix #26437) (#26441)@[direct_array_access] (#26507)import regex.pcre (#26545)cipher.AEAD (#26632)camel_to_snake underscore placement in uppercase runs (#26634)for x in start .. end { support (#26248)-b wasm before the checker stage (#26281)for in strings and FixedArrays (#26290).wasm.v, and platform independent .v files (#26386)$veb.html() too in the compiler error messages, as a known comptime function (#26605)-new-transformer (#26341)-assert backtraces after e317c63+= overloading for aliases, regression after 29e60da #23967 (fix #26416) (#26423)./v test vlib/toml after 38ac4e6 (#26485)-o short flag conflict that broke hot reload (fix #26221) (#26277)// inside string literals (fix #25603) (#26240)v missdoc @vlibv questv install --local guiv check-md . (#26623)-subsystem windows executable (#26572)strings.lorem module; use it in the Markov chain text generator
example (#26387)v run examples/2048/ on macos (regressed after 5d6de17) (#26705)31 Dec 2025
if is shared support (fix #25600) (#25602)defer{} scoped by default, use defer(fn){} to get the old behavior #25639) (#25665)COMPTIME, that runs after the checker (CHECK), and before the
transformer (TRANSFORM), to simplify the work that later stages do #26068 (#26161)for in loops with pointer values (fix #25520) (#25536)or {} inside loop when using c <-val (fix #24550) (#25435)defer(fn) inside function-scope and lock stmts (#25681)defer is function-scoped (#25693)all, any, count,
filter, map, sort and sorted (#25759)v -W test vlib/builtin job on the
CIv new --web abcd after feedback from https://youtu.be/IuE6Bo1klK0?t=555$for eval body statements at least once to set types and avoid markused issues later
(fix #26058) (#26063)_ being used as both import x as _ and fn f(_ int) { (fix (#26219) #26230@[deprecated_after] used without a corresponding @[deprecated] attribute (#25712)|mut x, y|expr (fix #25734) (#25735)a, b and it as var names, when using the builtin array methods (fix #25729)
(#25755)-d trace_parse to ease diagnosing problems related to the order of parsing of .v files
in moduleschan used as a fn parameter type (fix #25818) (#25854)type MyBuilder = strings.Builder work (part 1); add mod fields to
ast.SumTypeDecl and ast.AliasTypeDecl (#25943)if and match constructs
(#25674)v -d trace_launch_tool self.vsh mode doing an implicit import os, now only for .vsh file itself (fix
issue spotted in #25736) (#25745)-file-list support (implement feature #25707) (#25749)-g and -show-c-outputv download for downloading the prebuilt photonwrapper shared library (#25849)msvc: failed to build a thirdparty object,
not just the failed commandfailed to build a thirdparty object message for msvc-new-transformer (
#26009)expand_simple_interpolation (#26135)for x < y { body (
#26153).debug.obj thirdparty files when -g is
passed, to prevent linking issues (#26215)@[noinline] on os.create/1 to workaround a -cc gcc -prod panic (fix #25549)u8(x).repeat(y) (fix regression after #22100) (
#25625)v -experimental program_using_gg.vrune and char types too (#25635)defer(fn) { syntax where appropriate (part 2 of #25639) (#25653)@[direct_array_access] to hot functions (#25750)'1.23e-308'.f64() (fix #25751) (#25752)import math (just for int_max), to improve compilation time and complexity
for code that uses sha3-d no_getpid and -d no_gettid for systems that lack proper process management
APIs== with eq_epsilon() in equals() (#25873)v -new-transformer vlib/strconv/atoi_test.v (#26021)\r occurence in multi-line """ strings (\r\n is still allowed) (#26029)TODOs for fixed issue #9507 (#26037)jq normalization (#26092)key/* exceptions (#26125)x := s.index(sub) or { -1 } pattern (#26123)array/* exception (#26138)key/duplicate-keys-06.toml (#26140)true and false as keys when parsing root table (#26144)v vet -W vlib/flag/ (fix remaining doc comments)push_http_header (#26155)table/* (#26189); is used (fix #25544) (#25561)veb.Result (fix #25970) (#25973)Result type with column names (#25737)mut db := sqlite.connect_full(":memory:", [.readwrite, .create, .fullmutex], "")! defaulting to
unix/win32 depending on the platformv check-md vlib/db/pg/README.md-new-transformer dynamic array (#25817)$if trace_native_todos ? { to reduce noise in v test-all-no-closures option to detect closure usage earlier (for emscripten or for less well
supported platforms) (#25565)fn (d Struct) a[T]() T { return d } when T is a sumtype (#25644)defer stmts with if exprs and or blocks that return a value (#25651)defer generation within comptime $if/$match/$for (#25677)ast.ComptimeSelector in fixed array checks (fix #25767) (#25777)$for, handle in dumpexpr (fix
#25781) (#25784)-d trace_check and -d trace_cgen to help diagnose checker and cgen ordering issues-d trace_cgen_fn_decl and -d trace_cgen_gen_fn_decl too-d trace_cgen_fn_decl and -d trace_cgen_gen_fn_declstmts_with_tmp_var (#25915)$for method in Type.methods { (#25976)@[heap] structs with large fixed arrays (fix #22690) (#26183)v doc with VJOBS=1 on the CI, to make remote diagnosing of failures easiersw := time.new_stopwatch() callv test . toov test cmd/tools/vdoc step too, to ease diagnosing remote CI failuresv -silent test .timeout-minutes: 15 to timeout-minutes: 20 to reduce false positives due to
network timeouts (mostly for the Termux job)v help check-md when v check-md . failssanitize-address-clang-without-gc that passes -gc none through VFLAGS (#25780)VTEST_SHOW_LONGEST_BY_RUNTIME=5 \
VTEST_SHOW_LONGEST_BY_COMPTIME=5 \
VTEST_SHOW_LONGEST_BY_TOTALTIME=5 \
v test .
v test-all output to ease visual comparisons in separate
shells, without scrolling-q descriptionv search failures easier to diagnose (on the CI)v download -o some/folder/local.toml TOML_URL, in addition to --target-folder--sha3-256 support for checksumming the content that v download savesvtest build: tags to eliminate the need for the skip_fsanitize_too_slow list in
vtest-self.vIf the code is in a folder with multiple .v files for temp V REPL
files, to improve messages for 'asdas'.starts_wiz('xyz')-new-transformer task to v test-all. Remove -skip-unused flags (it is the default
for ~1 year).v -W -silent test-self vlib (especially on CIs); always
show compilation errors for failuresVTEST_KEEP_SESSION=1 ./v test vlib/mathis_sqlite3_present check more robust (work with the system packaged sqlite library
again too)macos-14 instead of macos-13 (the older runner is being deprecated) (#25670)v run ci/linux_ci.vsh v_self_compilation_usecache_clangsqlite module.-std=c99, instead of -std=gnu99 to avoid name colisions with C
linux macros defined by gcc/clang (#25848)gcc as the name of the compiler instead of egcc on OpenBSDv -W -silent test-self vlib on linux, so deprecations/warnings introduced in PRs, can
fail (and be fixed) earlier (#25955)-d max_suggestions_limit=140 for v itself, to improve handling of large .v files
with many thousands of lines on windows./v doc -check-examples -f none vlib/ (#25554)v -d trace_execution run examples/brainvuck.v mandlebrot.bf-silent for the v build-examples task on windows, to make it easier to diagnose
recent gcc-windows timeouts-silent from the macos build_examples task too, to make remote diagnosing of CI
timeouts easierupdate_fn: fn (dt f32, ctx &gg.Context) to gg.Context and gg.Config . Pass
consistently the current GG context to all callback functions, instead of nil.v -d trace_before_request run examples/veb/veb_example.v after feedback
from https://youtu.be/IuE6Bo1klK0?t=2100rg --multiline --multiline-dotall "continue\n\t+\}\n\t+\}\n\t+return" -B3 -A3 v -os macos -experimental -b native -o hw.macos examples/hello_world.v on
linuxdoomv (#26200)19 Sep 2025
-div-by-zero-is-zero, which allows for x / 0 == 0 and x % 0 == x, avoiding division
by zero traps/panics (#24981)@OS, @CCOMPILER @BACKEND and @PLATFORM (#25174)gx and replace all occurences with gg (which now contains all the functionality of
gx) (#24966)sizeof(T) usage in generic struct (fix #24806) (#24808)$if sizeof(T) == int_literal { support (#24831)builtin.closure in 2d87ac4 (
#24989)err removal (#25043)v -is_o -o x mm.v, where mm.v starts with module abc (i.e. not just module main)x in p.imported_symbol (#25201)T.typ and T.unaliased_typ checking to $match (fix #25200) (#25202)$match @OS { too (#25222)unsupported size ... for global messages, for
v -b native examples/hello_world.v-force-bounds-checking to enable easier testing of functions
tagged with @[direct_array_access] (essentially turning off that flag)for c in [othermod.Struct{field: 255}] { (fix #24943) (#24978)-translated mode (fix #25024) (#25061)=r, =&r, +r, +&r,=m,=rm,=@ccl, =*r) (fix #25070) (#25072)ui, during the migration of code from gx to gg) (#25106)v -cross -o vc/v.c cmd/v (part 1) (reduce CI annotation
noise)mod field to ast.FnTypeDecl too_option_none too (fix #24862) (#24885)@[markused] from option and result fns (#24900)@[markused] for interface declarations too (#24963)v -shared run empty.v (issue found by Felipe Pena)PANIC DEPS too (for consistency and easier redirection for the whole
trace)$if support (enable
$if platform { import module struct Abc {} }) (#25216)-d trace_type_symbols_after_checkerx.crypto: initial addition of curve25519 module (#24748)
thirdparty: add NDEBUG check before glGetErrorCode if-statement in sokol_gfx.h (#24754)
math.big: remove unnecessary code from / and % (the same is done in div_mod, which they call) ( #24766)
builtin: add a rune iterator method to strings, allowing for for i, r in s.runes_iterator() {
without first allocating an array for all the runes (#24769)
builtin: support -d builtin_free_nop to help diagnose problems with too early manual free()
calls
builtin: use s.runes_iterator() in trim_runes/2 to avoid needless allocation
builtin: add string.expand_tabs() (#24781)
os: do not resolve symlinks in os.find_abs_path_of_executable/1 (fix #24759) (#24761)
os: improve documentation (#24790)
gg: allow for -d gg_memory_trace_frame to be used in combination with
-prealloc -d prealloc_dump
sync: add SpinLock (#24788)
os: fix documentation for environ function (#24796)
sync: fix documentation for new_spin_lock function (#24795)
sync: add implementation for WaitGroup.go/1, add test (#24797)
sync: improve documentation (#24799)
sync: fix spin lock, add destroy() and try_lock(), add valgrind annotate support (#24798)
os: add os.write_bytes/2 as a complement to os.read_bytes/1, add test
sync: use SpinLock for channel (fix #24680) (#24802)
crypto: fix ambiguous expressions in DES implementation (#24814)
sync: use an atomic counter in test_waitgroup_go in waitgroup_test.v
datatypes: add lockfree version of counter and ringbuffer (#24839)
sync: add thread local storage (TLS) support (#24849)
math.unsigned: fix rotate_left() for uint256, add test (#24872)
math.unsigned: replace untested comments for uint256 public APIs (#24873)
log: use @[noinline] for level_from_tag/1 and target_from_label/1 to avoid triggering panics for
programs using log, compiled with -prod and -cc gcc>10 (fix #24874)
math.big: fix toom-cook 3-way multiplication (#24888)
runtime: add used_memory() (#24897)
runtime: add note for the availability of the used_memory implementation (#24913)
os: remove commented code in home_dir() function (#24929)
math.big: fix the order of calculations in mod_pow() to improve performance (#24935)
math.big: add shrink zeros to karatsuba and toom-cook (#24937)
math.big: fix big_mod_pow() (#24939)
os,runtime: move some C struct and fn def to builtin (#24942)
math.big: fix validate_string and integer_from_regular_string (check for characters.len > 0, before accessing characters[0])
builtin: prepare for adding a -force-bounds-checking option
strconv: fix bounds check bug, discovered by the equivalent of
./v -g -force-bounds-checking test vlib/toml/ (thanks to tankf33der)
builtin: fix OOB bugs in s.is_bin, s.is_oct, s.is_hex, discovered through
./v -force-bounds-checking test vlib/builtin/
regex: fix OOB bug discovered through ./v -g -force-bounds-checking vlib/regex/ (fix by
@penguindark) (#24960)
time: fix custom_format panic (fix #24977) (#24987)
time: fix more panics in the supported specifiers in Time.custom_format/1 (#24988)
vlib: add archive.tar module to enable reading of .tar ang .tar.gz files (#24995)
builtin: fix warnings for ./v doc -m -f html vlib/builtin/
sokol.gfx: set the missed array_count field too in the set_vert_uniform and
set_frag_uniform APIs (#25019)
builtin: fix assert "ä ö å æ ã ø ô é ë".title() == "Ä Ö Å Æ Ã Ø Ô É Ë"
(fix #25017) (#25026)
Apply @[markused] to builtin_init, remove its heuristic from markused.v
gg: improve drawing effect and logic of draw_rounded_rect_empty (#25062)
math.bits: add asm implementations for some 64 bit ops (#25020)
vls: autocomplete for module functions: e.g. os. ...
math.big: move from u32 to u60 digits (#25018)
os: simplify file.c.v using cross platform f.seek/2 calls, add EINTR handling to f.write_full_buffer/2 (fix #25107) (#25110)
builtin: add arr.pop_left() func (#25133)
math.big: refactor add_digit_array() (#25138)
math.big: optimize add_digit_array() (#25139)
math.big: optimize subtract_digit_array() (#25142)
strconv: produce a maximum of 8 digits after the . for f32.str() (fix #25141) (#25144)
math.big: restore and refactor str() and integer_from_string() (#25154)
os: remove unknown host OS panic from os.get_host_os()
flag: fix tail/single bool flag error condition logic in flag_to.v (fix #25166) (#25172)
flag: improve the fix for #25166 tail/single bool flag error in flag_to.v (#25189)
readline: fix wide char display width for Chinese characters (fix #25219) (#25220)
repl: fix handling of lines with comments like math.pi // comment (fix #25229)
time: always return utc() timezone for Time.unix/0 (fix #17784) (#25233)
builtin: fix C prefix for proc_pidpath() (#25239)
math.big: replace division with Knuth, improve performance (#25242)
time: move the nanosecond comparison before the rest in the Time == Time implementation
builtin: add a temporary ctovstring_impl/1 API to enable ui to compile cleanly for PR#25264,
part 1
json2: replace encoder with new implementation (#25224)
json2: improve enum decoding; fix handling of required fields at the end of a json string (#25289)
json2: improve checker with better EOF detection (#25075)
json2: prepare for moving into json2 (#25039)
json2: fix remaining json2 discrepancies (#25029)
json2: support custom decoders (#25021)
json2: fix number decoding and improve errors (#25015)
json2: add support for decoding utf-16 surrogates, produced by some JSON encoder implementations ( Python, Java, C#) (#25193)
x.crypto: add a new ascon cryptographic module, based
on https://doi.org/10.6028/NIST.SP.800-232 (Lightweight Cryptography Standards for Constrained
Devices) (#25260)
x.crypto.ascon: improve the core of Ascon permutation routine (#25278)
x.crypto.ascon: improve single-shot functions of ascon hashing variant; add benchmark (#25282)
x.crypto.chacha20: improves the internals of chacha20, add a bench (#25311)
app.text() -> ctx.text() in README.md-d trace_tcp; move error_code() calls right after the
corresponding C APIs (errno is a global that should be read immediately to be valid)/dist/littlejs.js?1117like, in, not in etc (fix #25032) (#25035)a := []Type{len: x, cap: y} and a[i] read/write (#25299)static and volatile var deref (fix #24778) (fix #24779) (#24807)struct none { in cgen, if none is not used by V code reachable from fn main() { (
#24824)struct map { and related type declarations, when no V maps are used (#24826)type Dict = map[string]string (fix #24878) (#24883)__closure_init call for sokol/gg programs on android as well (#24892)next method (fix #24890) (#24894)next method if defined in for x in iterator { (#24905)in operation (fix #24983) (#25011)err declaration or or { } blocks (#25034)#if defined __BIONIC_AVAILABILITY_GUARD && ... to be compatible with more Termux versionscast(&(arr.last() as Type)) (fix #23528) (#25132)$if results in checker only (fix #25123) (fix
#25156) (#25150)"$for (fix #25211) (#25212)@[reused] attribute to mark methods, reusing the receiver memory on return (needed for
autofree) (fix #25221) (#25235)builtin APIs with builtin__ (#25264)if x := g() { x } else { return } adding newline after return (fix #24908) (#24945)@[deprecated] pub type Alias = int (fix #24968), workaround
-usecache bug (#24969)-new_int (part 2) (#25298)main instead of master as their core branchv should-compile-all more immediately useful in CI jobs (turn off stdout
buffering)// vtest vflags: -w in _test.v files, to allow v -W test . later, for files,
that have known warnings-prealloc self compilation checks on more platforms (#24891)-force-bounds-checking optionv repeat "program" "program_that_is_over_10x_faster"return"" in vdoc html output (fix #24979)v repeat -S, to only show the summary of
the runs, without the progress lines-cc gcc too./v doc -m -f html vlib/Copying instead of Generating for the static resources in ./v doc -m -f html vlib/-is_o option (in v help build-c) and add a test for it (#25052)pkg install in termux_ci.yml to reduce false positives.-os termux, to
make the emulation closer to a real Termux (#25128)apt update to reduce the recent
timeouts during installing dependencies (#25147)awalsh128/[email protected] instead of a manual apt update/apt install
step, to leverage caching more (#25256)awalsh128/[email protected] works on master (#25257)Unhandled Exception on windows 7 (#24803)thirdparty-linux-armv7_bdwgc.sh for building libgc.a on ARMv7 CPUs (#25077)v build-tools without flags for the tools-windows jobv -cross -o vc/v.c cmd/v on linux (part 2, see also 037a3b4)v -cross -o x.c cmd/v on windows too (part 1, fix V errors)apt update commands, in
ci/linux_ci.vsh, when run in a github CI runnerv build-tools and v build-examples running on a i686 (the problem was discovered by
@tankf33der)v -cc gcc examples/hello_world.v (#24996)v doc -check-examples -time -f ansi vlib/builtin/ passv doc -unsafe-run-examples -time -f ansi vlib/builtin/ pass toov doc -check-examples -f none vlib/builtinv doc -unsafe-run-examples -f none vlib/bitfield/ toov doc -unsafe-run-examples -f none vlib/arrays/parallel/ toov doc -unsafe-run-examples -f none vlib/arrays/ toov doc -unsafe-run-examples -f none vlib/compress/ toov doc -v -unsafe-run-examples -f none vlib/ could be added to the CIv -W -Wimpure-v examples/hello_world.v (move ctovstring_impl to builtin.c.v)19 Jun 2025
js"string literal" for JavaScript strings (#24653)any arg, prevent any from being used as map key,value or array
type (#24277)c.expr(mut node.left) rechecks for ast.CallExpr (fix #24353) (
#24380)pub const pname = &char(C.SDL_POINTER) to fix the clean
compilation of code using vlang/sdl3[]T (fix #24423) (#24457)filter, count, any, all (fix #24508) (#24540)ast.ParExpr first in prefix_expr (fix #24584) (#24588)arr << logic to check_append()or{} expr (fix #24656) (#24658)if mut x != none {, when x is an immutable option (fix #24692) (#24694)struct Abc { pub mut: } (fix #24404) (#24403)mut static counter := 0 inside unsafe {} blocks (prepare for removing a -translated
mode quirk)unsafe { nil } to be voidptr (fix #25558) (
#25570)$compile_warn(msg) and
$compile_error(msg) (#24992)$if T is $pointer { and $if T is $voidptr {, to make it easier to implement a pure V
dump(), without cgen specific code (#24628)$int too (fix #24346) (#24378)$dbg with @[heap] structs (fix #23979) (#23989)x := t.wait(), when t := go fn () string { (fix #24577) (#24580).js.v when -backend has already been used (fix #7840) (
#24654)strings.Builder.clear(), fix array.clear() not working in the JS backend (#23992)xor_key_stream failing after a while (fix #24043) (#24046)new_cipher to be !&Cipher (#24113)crypto.ripemd160 module (#24119)-b wasm -d no_imports (#24188)$if var.return_type == 1 { (fix #24391) (#24393)encode/1 types of T != struct (fix #24435) (#24443)exp_decay to interpolation.v (#24545)dotfiles := os.walk_ext('.', '', hidden: true) (#24617)T.indirections comparison (fix #24630) (#24636)@DIR (as a comptime equivalent to os.dir(@FILE)) at runtime) (#24742)-os androidread_ptr/2 (from read/1) to UdpConn for consistency with TcpConn (#24000)close/0, select/2 and remote/0 methods of UdpSocket pub (#24004)@[unsafe]-d veb_max_read_bytes=16384, -d veb_max_write_bytes=16384,
-d veb_default_port=1234, -d veb_max_http_post_size_bytes=8388608v -http -d http_folder=vlib/_docs (allow customizing the folder, port, and
index file through CLI arguments to v -http)sanitize-memory-clang tooin and not in to orm_func (fix #24639) (#24642)for in string for amd64 (#24613)C.EOF (#24724)prof_measured_time into a thread local, for the supported C compilers) (#24061)@[keep_args_alive] with ptr (fix #23973) (#24058)x in [...]! operator with fixed arrays (fix #24082) (#24083)assert s[x..y] == "literal" (fix
#24103) (#24105)index loop var (fix #24117) (#24124)-cstrict + notice about such usage (fix #24139) (#24143)strip should be used instead); temporary fix for usecache + tomlif mut var != none { for optional interface values (fix #24351) (#24410)unsafe {nil} comparison and initialization (fix #24374) (#24411)for mut var in arr { to pointer (fix #24432) (#24456)nil or 0 to option ptr field (fix #24447) (fix #24500) (#24502)a == [?int(none)] (#24504)nil param to arg expecting ptr (fix #24491) (#24503)const_init_or_block.vv in vlib/v/gen/c/coutput_test.v, when
VFLAGS=-no-parallel is usedswitch() { statements, generated by match() { ones (#24618)"hello".str => c"hello" (fix #24635) (#24652)unbuffer_stdout() to make the output more reliablesanitize-memory-clang? instead of sanitize-memory-clangs390 CI job for simple doc/yml changes (#24160)src subdir from projects, created by v new (#24236)// vtest build: !os_id_ubuntu? tags in the _test.v files, detected by v testv -o v2 -usecache cmd/v after ad5b829import mod { f } (#24340)gh-builder)v timeout, support killing the child process on timeout by default (#24367)v timeout 2 sleep 5./v -d network test cmd/tools/vpmv reduce, fix timeout leaks (#24405)v doc produced html nodes toov doctor (packaged V versions often lack a .git/ folder) (fix
#24419) (#24420)arrays.diff module, implement a simple platform independent tool
v diff file1.txt file2.txt using it (#24428)v retry to reduce the false positives for retrieving the dependencies for vinix toohg version too, to ease the diagnosing of install_version_test.v failuresv doctor show CFLAGS and LDFLAGS too (if set)v search ui work again through the vpm site (fix #23966) (#24535)v test vlib (fix #24505)v watch (such DB files are very likely to change
during prototyping)v doc -f md module output useful by default (#24737)apt update before apt install in cross_ci.yml, to make the linux job more robustv doctorC.CREATE_NO_WINDOW on windows in os.raw_execute/1 (fix #24390) (#24418).hg/hgrc file for install_version_test.v (workaround windows failure)/opt/local/lib/pkgconfig for MacPorts on macos (#24626)cmd/tools/vtest_test.v (#24707)v -os wasm32_emscripten -o ms.html examples/gg/minesweeper.v (use os.asset to load the font,
avoid the implicit closures for the frame/event callbacks)'sync.pool implementation on
different platforms-profile report column, to show only the func time, excluding the accumulated children
calls time (usable through ./v -profile - run a.v |sort -nk3 for example) (#24056)v -gc boehm_leak -cg -keepc run examples/gg/minimal.v (part 1 - before the gg loop) (#24749)20 Mar 2025
[attr] syntax an error (@[attr] has to be used instead)string.index_after() now returns an Option (like string.index()), use
string.index_after_() for the old behaviornone to be passed to ?T param (fix #23381) (#23385)for iterator method .next(), not marked as used (fix #23312) (#23321)[]T (fix #23315) (#23322)as casting (#23327)as operator (fix #23349) (#23358)foo(?i64(123)) for fn foo(x ?I64) { and type I64 = i64 (#23373)node.args[0] on fixed_array_builtin_method_call and array_builtin_method_call (#23411)&(&var) (fix #23365) (#23418)&((&a)) and similar expressions, with innermost ast.PrefixExpr (enhance #23418) (
#23419)return in lockexpr stmts (fix #23434) (#23435)m[key] if m is Option (fix #23446) (#23459)@[markused] from fn isnil(), set
c.table.used_features.auto_str_ptr = true instead (#23464)a := [none] (fix #23457) (#23504)node.args.len, method.generic_names.len, node.concrete_types.len and
node.op.str() (#23536)expr is Type if expr is Optional (fix #23486) (#23510)option_var.str() an error, when done without unwrapping it first (fix #23557, fix #23558) (
#23563)arr = voidptr(0) (fix #23675) (#23687)module no_main programs, that can redefine their own main function, or not define any
of their own as wellpub type C.HINSTANCE = voidptr, being used in@[export: "wWinMain"]
fn mymain(x C.HINSTANCE, xprev C.HINSTANCE, lpcmdline &C.WCHAR, cmdshow int) int {
in module no_main programs (#23812)v := if c { none } else { none }) (#23829)none is used (fix #23831) (#23833)any type validation on assignment (fix #23905) (#23906)[]!type{} (fix #23360) (#23375)map[k]v(expr) (#23401)-statsstruct Abc, that lacks a body (#23627)import mod { Sym }, when Sym is later used, for more cases (fix
#23412) (#23626)-d trace_parse_file_path_and_mod, to help diagnosing module lookup problems@[has_globals] to be used for all V programs, turn the @[wasm_import_namespace]
error into a notice$for (fix #23953) (#23959)-skip-unused on a short program, that prints array (fix #23436) (#23437)eprintln(err) on imported module on short program (related: #23498) (#23499)-- (#23470)unknown command suggestions, for more misspelled variants, like v sefl; make
util.new_suggestion calls parametrizable-os wasm32_emscripten and filtering _d_wasm32_emscripten.c.v and
_notd_wasm32_emscripten.c.v files. (#23797)./v -os cross -o vc/v.c cmd/v && clang-18 -o v_from_vc vc/v.c -lpthread#flag -DName=$d(...) (#23895)@VCURRENTHASH, to minimise the vlang/vc diffs for each
commit-d trace_parsed_files#line directives with tcc (the ../../../.. etc is no
longer needed with newer tcc) (#23974)-cflags -D_SGL_DEFAULT_MAX_VERTICES=4194304 to customize how many
vertices you can send through gg/sokol in a frame@[markused] tag to isnil(), because cgen generates calls to it in some cases (
#23462)os.split_path('/usr/lib/test.so') -> ('/usr/lib','test','.so'); fix
platform dependent behaviour of os.dir/1, os.base/1, os.file_name/1 (#23532)-prealloc -d prealloc_memset -d prealloc_memset_value=65 -d prealloc_dump, to
better analyze the memory patterns of running V programsstbi.resize_uint8/3,
with a different fn signature) (#23580)FnGC_WarnCB alias (#23633)ecdsa.PrivateKey.new() to use a high level API (#23640)encoding.csv.RandomAccessReader (#23677) os.quoted_path() to os.system calls using v.pref.out_name, for the compress
flag (fix #23685) (#23686)#flag $when_first_existing(libABC.a, /some/path/libABC.a, ...), without
panicing (unlike #flag $first_existing(...)) (#23780)rotate_around_* (cw/ccw) functions to vec.Vec2[T] (#23807)-os cross -o vc/v.c (avoid the generic calls in the new write_u8
and read_u8)./v -os cross -o vc/v.c cmd/v && cc -o v_from_vc vc/v.c -lpthread./v -prod -cstrict -cc gcc-11 vlib/math/math_bench_test.v (use unions to implement
f64_bits/1 and f64_from_bits/1 for compilers != tcc)PrivateKey.new by avoiding match+assignments (
#23899)calc_digest_with_evpkey (#23901)-cstrict -cc gcc-11 passes for markdown
as well".public_key method of PrivateKey (#23920)sign_digest routine (#23960)ctx.no_content() + prevent content-type being set if the mime type is empty (#23425)-cstrict -cc clang-18 -prod compatibility for programs that do
import net.mbedtlsverbose: true option, to restore the old
behavior if needed (#23725)SSL_get1_peer_certificate instead of the deprecated SSL_get_peer_certificate .v run file.v, in case of compiling a program with warnings/notices.-d trace_sqlite, not just for the ORM@[flag] (#23975)none (fix #23318) (#23320)-d trace_unused_by_main and -d trace_skip_unused_just_unused_fns, to find out
potentially obsolete functions that are not used at all in a project-cstrict (fix build of chip8-v project) (#23414)instance.t.wait() on default 0 initialized thread field t (fix #23390)
#23392field union {, to improve interoperability with C (
similar to field struct {) (#23539)map[Enum]Value, and enum Enum as u64 { (fix #23630) (#23632)for or-block (fix #23625) (#23644)map_set (fix #23650) (#23652)if true {$if typeof[T]().idx, $if typeof[T]().unaliased_typ checking (#23665)@[sql: serial] and @[serial] are not the same (fix #23346) (#23678)v -path bootstrap_alternative_backend/ run simple.v (#23679)#postinclude directiveglobal_g.out << g.out instead of global_g.out.write(g.out) or { panic(err) }-gc none -d no_main -no-builtin -no-preludes to compile C
style V programs@[keep_args_alive] (partial fix for #23804) (#23805)g++ (fix #23701) (#23870)./v -prod -cstrict -cc gcc-11 test vlib/math/ pass cleanly (workaround a problem in V's
cgen, that -cstrict discovered)pub fn (mut a []string) free() { method, NOT the generic
fn (a &array) free() { one. (#23911)T.key_type, typeof(expr).key_type, T.value_type, typeof(expr).value_type,
T.element_type, typeof(expr).element_type for getting Map[K]V and []T types (fix #23914) (
#23962)v should-compile-all folder/, where folder/ contains project subfolders (containing
v.mod files and multiple top level .v files)v should-compile-all . with support for compiling .wasm.v and .js.v files; skip
module name files, compile projects that have .glsl filesv bug report wordingemcc --version diagnostic in v doctor, when emcc is presentv -W build-tools (#23368)v buf file.v, when run in a folder != vrootv bug file.v, fix v bug /long/abs/path/file.v toodocker-alpine-musl-gcc job (#23399)v vet folder/ + new features (track long fns, empty fns and repeated code),
enabled by the new -F and -r flags (#23405)v help crun (#23431)-I option to notice fns, with the potential to be inlined (#23534)v check-md . print the actual length of lines too, when reporting errors/warnings about
them (#23606)v download (show progress on stdout, when it is connected to an
interactive terminal; hide log stdout->stderr notice)CI=name ./v -d network test cmd/tools/vpm/ ; update the image runners in vpm_ci.yml (
#23628)v reduce program.v, in order to make smaller reproductions (rpdc.v files), before filing
cgen bugs (#23636)cmd/tools/vrun, to make it easier to use .vsh scripts on systems,
with /usr/bin/env still not supporting -Sv run shebang in cmd/tools/vrunv reduce parser for functions, and add more loops to reduce more (#23694)v reduce output; bump version, warn on failed string_reproduces/3, but continue to run (
#23697)v reduce (#23709)cmd/tools/vdoc/doc to cmd/tools/vdoc/document, so that it can be imported from other
programs through -path, without conflicting with the top level doc/ folder in the main repo (
#23733)-skip-unused tasks, since that is the new
default (#23746)v -g self in .github/workflows/native_backend_ci.yml, to improve remote
diagnosis of panics in PRs-silent for the longer test runs (suppress most OK lines, to reduce scrolling on
failure)v repeat failing_cmd show the error output just once, but also still measure the time it
took to executev ast (#23938)v timeout to be able to later use v timeout 5.1 git -C . fetch V_REPO in v doctor and
other tools.git -C . fetch V_REPO in v doctor (it
normally takes <1s) (fix #23955)v doctor -skip-github to fully skip the fetching step, in places that have limited
connectivity (alternative fix/workaround for #23955)fn screen_size() Size (fix #23146) (#23326)v doctor format, fixes for windows, tcc and others (#23361)DYLD_FALLBACK_LIBRARY_PATH on macos, when -use-coroutines is used, so that v run
can work, and the executable can find the downloaded photonwrapper shared library (#23516)v doctor output on OpenBSD: get gcc version from egcc; do not run ldd to get the glibc
version (fix #23576) (#23578)v download (#23613)v test . show the running _test.v files each minute (set by
VTEST_REPORT_RUNNING_PERIOD_MS); diagnose stuck windows gcc CI jobs (#23649)ubuntu-20.04 to ubuntu-24.04 (#23706)VJOBS: 1 in the windows tcc job anymoreVNATIVE_PE_DLL_PATH, to make it easier to diagnose problems with PE generation on non
windows platforms (#23756)v (#23779)-b native, competing the creation of the
backend executable => CI failures on the gcc-windows job)v install avoid using --filter=blob:none --shallow-submodules --also-filter-submodules on
windows (#23840)// vtest build: !do_not_test ?, // vtest build: !windows && tinyc to skip files during
testing on specific platforms, without having to keep centralised skip lists (#23900)dl, generate a DllMain() in cgen instead for -shared on
windows (#23961)v bug, for example: v bug -cg -autofree file.v (
#23335)-cc tcc, improve the infrastructure, use
a V global instead of a C one (fix #23214) (#23350)./v -check-unused-fn-args examples/tetris/log.use_stdout(), use it to silence the transition note for the most commonly used V
tools/examples (#23642)v ast, to skip all nodes with default values like [], {}, 0, false;
with it v ast -pts examples/hello_world.v | wc -l is 36 lines./v -gc none -autofree run examples/tetris/ (avoid return s1 + s2 + s3, clone the
arrays, passed to the fontstash wrapper)module no_main as wellv build-examples failure on gcc-windowsmodule no_main based examples in v should-compile-allv -os wasm32_emscripten -o examples/tetris/tetris.html examples/tetris/ (avoid
using -sMODULARIZE) (#23814)math.vec, the builtin array support, instead of datatypes, and by
removing casts that are no longer neededv -cstrict -cc gcc-11 examples/sokol/particles and the same but with clang-18 too-cstrict -cc clang-18 for the sokol examplesVFLAGS='-no-skip-unused -cstrict -cc clang-18' v should-compile-all examples/sokol/ toovanilla_http_server - a fast, multi-threaded, non-blocking, port and host reuse,
thread-safe, epoll server (#23094)linux&&gcc // some commentv repeat -R 5 -r 10 "v run examples/hello_world.v" also show the time it took for all runs
in each repeatv should-compile-all examples/22 Dec 2024
-skip-unused is now on by default resulting in much smaller cgen and binaries. 70% reduction for
hello world.-parallel-cc for speeding up -prod and -cc clang/gcc compilation by up to 14 times!#include "foo.c" is enough (behind
-experimental for now)..index .any .all .map .sort .sorted methodsin expr with number ranges: if var in 1..4 { (fix #20352) (#22754)match, in and ==) (#22643)map[k]()? and map[k]()() (#22740)if tree.root != none { (#22895)array.count as a method that accepts a predicate, similar to filter, but returning just the
number of matches (#23054)== and != (fix #23108) (#23113)22:47:08Z (#22585)T.unaliased_typ if branch evaluation (fix #22587) (#22598)App.method field initialisation, for fn fields, initialised with generic methods (#22665)f() or { T{} } in a generic method, for fn f() ?T {, being called with T, being a
container like []int etc, not just a primitive type like int (#22672)f() or { T{} } part 2, see also cc55aa5 (handle the case of an ignored result as
well) (#22687)& structinit (#22689)from_string type restriction (related to #22783) (#22803)foo[T] as a value (#22820)if expressions (#22845)mutable_field: const_array (fix #22862) (#22863)json.encode_pretty with a struct init expression argument (#22897)!= none, support if mut x != none { too (fix #22936) (#22943)v -check file.v on files with parser errors (fix
#22981) (#22982)$res() used in defer {} blocks with more statements, add a test (#22998)[]Enum{len: 10, init: .thing} (fix #23077) (#23165)T{} (#22682)@[must_use] tag for fns/methods, and an experimental -check-result option (#22983)type as field type on params struct construction (fix #23091) (#23098)type and other keywords as plain attr value (fix #23150) (#23154)@[tag] for hash statements, like #define and #flag (#23210):parse_text to the paths of .v files, printed by -print-v-files, for parse time generated
snippets_wasm32_emscripten.c.v suffix for platform files too-ldflags
is passed at the same time)Scanner.is_started field (#22918)-x objective-c with -parallel-cc for now-parallel-cc to parallel_cc.v-debug and -cdebug, as more explicit alternative names for -g and -cg (
#23208)-parallel-cc fails (
#23211)-no-prod-options to turn off passing -O3 -flto, while still keeping the
$if prod { branches (passing custom flags with -cflags -Os already works)-no-prod-options with -cc msvc as wellstring.starts_with/1 and string.ends_with/1, when compiled
with tcc (#22620)fixed_array_any_all_test.v (related #22609) (#22621)-d no_gc_threads for turning off passing -DGC_THREADS=1 while compiling the
GC libraryflag.to_struct, add test (#22696)shift_left/1 and shift_right/1 methods to BitField (#22700)string.is_pure_ascii() (#22748)x.encoding.asn1 (#22783)-autofree while recompiling the V compiler several
times@[markused] (used by cgen)@[manualfree] to workaround -autofree compilation issues with gitly, and other
projects using crypto.rand and math.bigos.getwd in favor of os.get_current_dir (part 1) (#22966)"-os cross (fix #22991)assert big.integer_from_int(1) == big.integer_from_bytes([u8(0), 0, 0, 0, 1]) (fix
#23115) (#23124)assert math.log10(10) == 1.0 pass in the common case (#23129)icon field to gg.Config, for easier access (fix #23135) (#23138)-exclude @vlib/math/*.c.v (fix #23136) (#23140)json_option_raw_test.v, compiled with
-fsanitize=address,pointer-compare,pointer-subtract) (#23172)rand.cuid2 module (#23181)import veb, only for templates that do use functions defined in veb-d picoev_verbose_errors, do not use any naked eprintln by default, since that
is a low level module-d mbedtls_client_read_timeout_ms=7000,
-d mbedtls_server_read_timeout_ms=60000, and -d trace_mbedtls_timeouts@[serial] attribute for marking struct fields (#22814)[1,2]! in a (fix #22559) (#22579)& prefix (fix #22628) (#22638)map[k] := fn () state, when assigning anonymous fns (fix
#22705) (#22707)json (fix #22717) (#22720)[1, 2, 3]!.map(it * 2) (#22722)assert [1, 2, 3]!.contains(2) (#22725)assert [1, 2, 3]!.index(2) == 1 (#22727)assert [1, 2, 3]!.reverse() == [3, 2, 1]! (#22745)-no-builtin flag (when used separately from -d no_main) (#22765)a in [x,y,z] optimisation for ast.IndexExpr and ast.SelectorExpr again (#22767)in expr optimization (#22764)or blocks for f() or {} (#22775)typeof (fix #22779) (#22782)err var on else branch, after last else if (fix #22784) (#22786)-cstrict (spotted in #22783) (#22802)T{} when T is ref type + dereferencing issue when comparing int alias to int (fix
#22795) (#22807)return if cond { x } else { return missing } (fix
#22838) (#22839)$if in an if expression, when compiled with -g (fix #22873) (#22888)msvc compiler does not support inline assembly to cgen (so it will only get triggered,
when ASM blocks are still present, in what is passed to cgen)x as string expr, when x is a ?string value (#22953)return (#22967)foo.bar as string, where foo.bar is ?string (fix #22960) (#22973)-show-timings -stats (#22990)gettid() on glibc < 2.30 (#22987)-cstrict (#23144)none (fix #23164) (#23168)none) (complete #23164) (#23176)return none for unwrapping (#23183)sql db { ... } blocks (fix #22601) (#22602)~same~ label, when the results in v repeat are not different enoughv repeat runs, done by compare_pr_to_master.v,
to reduce σ on machines with more varied loadv repeat -N ./cmd/tools/vtest_test, by adding a -N/--no_vexe_reset option to
v repeatzizmor .github/workflows/paths_ci.yml and fix reported issues (#22681)v test folder/ (#22716)v test to allow for // vtest hide_retries so that retry_test.v can hide its own (
deliberate) retriesmain_test.v files, to reduce false positives (workaround)v doctor output for missing cc. Add a diagnostic line checking for emcc --version toov fmt -w vlib/v/pref/should_compile.vv test)v retry timeout to 10 minutes, clarify the usage of its --timeout option.v retry in more places, that do network operations that can fail temporarily (#22836)v download -RD URL/script.vsh, to download script.vsh, then run it locally, then
remove it, in a single commandv help retryv help repeat./v -autofree -o v2 cmd/vv build-toolsv vet produce a nicer note, including the offending files, instead of file.v (
#22957)oldv, so it can fail early, with a meaningful
error message, if they are not present.-cc tcc -no-retry-compilation, do not use more complex constants, but functions in
vlib/math/vec/vec2_test.vv download instead of wget (#23196)v retry -- v setup-freetype to make the CI more robust against random network failuresmacos-14 instead of macos-12 because
of https://github.com/actions/runner-images/issues/10721ci/common/runner.v, use it to simplify ci/macos_ci.vsh even more-d no_vschannel-subsystem windows
insteadV self compilation with -usecache on macos for now (#23145)typeof(var).indirections and T.indirections (#22805)typeof(expr).unaliased_typ (#22806)T(v) / SumType(v) (#22664)T.methods with generic types and interface checking with is operator (fix
#22721) (#22724)examples/thread_safety/ (#22571)./v -os linux examples/json.v on macos (#22651)examples/veb/veb_example.v with V compiled with tcc on macosv compiled with tcc on macosv -skip-unused -cc tcc examples/hello_world.v on *BSDv run examples/net_t.v)./v -check -stats examples/hello_world.vv run examples/hello_world.v in a shell28 Sep 2024
implements keyword for explicit interface implementation$for param in method.params { (
#22229)@BUILD_DATE, @BUILD_TIME and @BUILD_TIMESTAMP, all using
v.util.get_build_time(), and overridable through SOURCE_DATE_EPOCH (#22213)x.vweb and vweb in favor of veb, a faster, easier, and more stable framework.@FN and @METHOD (#21990)const () groups (an error after 2025-01-01) (#22019)-d trace_checker and error diagnostic information on compiler panics@[_allow_multiple_values] attribute, when declaring enums that have duplicate
values (#22224)implements parts of struct declarations (#22230)mt sync.Mutex = sync.new_mutex()) (fix #18088) (#21949)any value in pure V code (prevents invalid cgen) (fix #12623) (
#22334)lock, used as a variable name (#21937)@include in templates, to work with relative paths & prevent recursive calls (#21943).${var} used in a template, compiled by $tmpl() (fix #22231) (#22270)-showcc (when the
cache is empty)v -dump-defines - -check cmd/v, which is faster, because it can skip code
generation-d trace_transformerint to f32Any in decode_struct, encode_struct and to_any (#21972)./v -cc clang-18 -gc none simple_bytebeat.v (the audio depends on threads)d,c,dd,ddd,dddd pattern support for parse_format() (#22003)@[tail] field when no fields has been matched yet in flag.parse[T]() (
#22043)-cc msvc -gc boehm (thanks to @Ekopalypse)arrays.parallel module, containing parallel.run/3 and parallel.amap/3
implementations (#22090)-d builtin_print_use_fprintf, make the C fn declarations stricter (#22137)m = {}, after multiple iterations
of setting keys and clearing (fix #22145) (#22146)flag.FlagParser style flags in to_struct[T] (#22152)flag.FlagParser style short flags in to_struct[T] (#22172)no_match entries instead (
#22191)u16/u32/u64 -> []u8 conversion functions (#22193)@[direct_array_access]scrypt module to vlib/crypto (#22216)[0, n) (#22266)x.benchmark module, that estimates automatically how many iterations are
needed, to get a statistically significant result (#22215)a + b and a - b, when the signs are different, add more test cases (#22330)vweb_livereload reference to veb_livereload (#22171)asm to c_reserved, fixes compilation of struct Abc { @asm int } (#22340)-repeats/-R N option to v repeat, to eliminate another need for platform dependent
scriptingdocker compose instead of docker-compose (
see https://github.com/orgs/community/discussions/116610) (#21992)v where ignore .git/ folders (they contain binary files); let -dir . work recursively, so
that -dir vlib worksv complete (#22041)v repeat command, by coloring the faster/slower labelv repeat for invalid combinations of -r, -i and -a flagsv doc truncating code blocks, that lack a specific language (fix #22017)v doc not converting <s> in plain code blocks into encoded html entities in its .html
outputnpx prettier --write **.yml; ensure it is run on all .yml files, not just the ones in
the .github/workflows/ folder-cc tcc -no-retry-compilation -gc noneincludedir= lines, had trailing spaces (fix -d use_openssl for
openssl 3.3.2 installed through brew on macos)rotating_textured_quad.v compile and run on Android (#21987)./v interpret examples/hanoi.vveb route (#22128)gc_is_enabled() check to 2048 to prevent crash in Android emulator (#22274)gg/rectangles.v Android friendly (#22275)gg/stars.v run on android (#22276)$if android { checks (#22281)26 Jul 2024
-d ident=value and retrieval in code via $d('ident', <default value>)-warn-about-allocs for debugging allocations when using manual memory management@[freed] attribute for assign statements (for the above mode)&&= and ||= operators (#21678)fn f(some int, ...) { (#21812)-n for skipping notes (similar to -w for skipping warnings)none
const n = int(sizeof(u64)); _ = [n]int{} (fix #21544) (#21548)@[noinit] (#21587)Result variants (#21620)field map (i.e. a plain untyped map), used inside a struct (#21625)$if x { condition, using const x = $d('ident', false) (fix #21709) (#21713)\uxxxxx in raw strings (#21724)field [$d('x', 2)]int = [1, 2]! (#21741)[$d('s', 4)]int{}, move resolving to method on ComptimeCall (#21701)$d() in fixed size array struct fields (#21731)@[flag] enum methods, with modules named flag (#21844)mod.Enum.val inside fn args (#21908)-coverage support + vcover tool (#21154)enum_variant = some_const + 10 (fix #21777) (#21779)v xyz instead of v xyz.v just once (#21801)-skip-unused (fix #21907) (#21914)os_nix.c.v (#21564)@[toml: ], support @[skip] (#21571)last_index_u8, deprecate index_u8_last string methods, make consistent with
last_index (#21604)string.split_any (#21612)crypto.sha3 hash and extended output functions (#21664)@[direct_array_access] to very commonly used functions (#21771)arrays.chunk_while([0,9,2,2,3,2],fn(x int,y int)bool{return x<=y})==[[0,9],[2,2,3],[2]]pub fn arguments() []string {; make os.args use it, remove edge case in cgen (
#21852)-d use_bundled_libgc to make it easier to debug/upgrade reliably libgc cloned
from ivmai/bdwgc (#21869)init value in the call, is an array (#21921)const x = int(0x80000000)m3u8 MIME type application/vnd.apple.mpegurl for multimedia playlists (#21688)Response.status() method comment, to indicate returning of a Status enum
field, instead of struct (#21735)text/x-vlang, for .v and .vsh file extensions (#21851)Interface(unsafe{nil}) change for now behind -experimental (#21593)-d no_bool option, for cgen compatibility with the C23 language standard (since bool
is a builtin type and a keyword in it) (#21637)-no-relaxed-gcc14 for
turning them off. (#21680)none (#21726)$dbg breakpoint is on or-expr (fix #21772) (#21747)[n]int{} (#21785)-translated mode (#21789)& in string representation of map[X]&Y (#21890)defer {}, just like or {}it variable name in match expression function calls (#21600)-diff flag (#21603)v download URL for downloading single files, to avoid curl/wget etc, which are not available
uniformly. (#21597)./v repeat "./vold -o x project/" "./vnew -o x project/"v repeat more informativetype FnType = fn(string) FnType and
type FnType = fn (FnType) string (#21733)./v -Wimpure-v -W test vlib/ pass on Linux (#21554)20 May 2024
x.vweb is now veb, the official and recommended way to build web apps in V. Built
on top of pico.v.@VMODHASH comptime variable to store the commit sha of a V module (#21091)& << >>, similar to && ||any type to the checker to resolve parsing issues (#21146)none to fn f(arg ?&Type) { (fix #21213) (#21231)continue and break statements (#21294)Result callbacks functions like map/filter/all/any (#21055)@[params] attribute as mutable function parameters (#21206)none is passed (#21509)delete and update (#21113)file_name_dir
field (#21202)for in Iterator{} { (fix #21179) (#21282)for x in Iterator{} {, when there are no field initialisations (#21333)$tmpl("x.html"), when the template file contained % at the end (#21402)ScopeVar and Ident (#21523)modules (#21083)githash to be able to get the githash of every passed project (#21178)v wipe-cache, when the object files are not recognized-cross, allow for $if cross ? {arch.c.v; rename pref.c.v to pref.v (#21387)os_from_string, add missing qnx, remove deprecated wasm options that used -
instead of _ (#21390)diff (#21435)v test-cleancode, when a slower diff tool is installed (#21447)diff.compare_text (#21458)v file.v --unknown-option (#21391)v vlib/v/gen/c/coutput_test.v for gcc14.1, which is stricterpub const is_used = 1 workarounds (#21160)i32 decoding and encoding (#21162)-autofree (#21204)at_exit(cb) wrapper for C.atexit (part 1) (#21254)s == '' or s != '', instead of s.len == 0 (#21300)command_test.v (#21307)__v_ start and __v_ endPenConfig fields public (#21353)- operator, union and intersection, now they no longer change the
receiver (fix #21315) (#21362)cli/testdata (#21456)decode_quoted_escapes (#21472)at_exit(cb) or {} (part 2) (#21263)mbedtls to latest compatible version v3.3.0 (#21118)host:port, not just a host address) (#21185)index.html by default), and auto_index (true by default)
parameters to file.serve()v -http for v -e "import net.http.file; file.serve()" .EAGAIN or EWOULDBLOCK quietly (#21480)field [5]?Type (
#21082)_M_ARM64 macro to endianness check (#21109)autofree comptime check (#21197)$if !autofree { (#21218)for mut v in [12, 13, 14] { v+= 2 } (#21237)none passed to a generic option cast expression (fix #21215) (#21276)-fsanitize=undefined used with []int{}.sort() (#21331)myarr [1]C.mytype fixed array fields, for pub type C.mytype = voidptr (#21266)#line 1000000 ... in the C footer with -g (#21388)v build-tools, when VTEST_SANDBOXED_PACKAGING is set (#21094)@NAME entries, to avoid mentioning unrelated github accountsv retry apt update, intended to replace the retry.sh script, for more robust CI jobs (
#21104)--help/-help flag after vet command (#21108)v build-tools (it skipped all tools in subfolders of cmd/tools/ after 6a4f293) (#21120)v run cmd/tools/measure/parser_speed.v file.vv run cmd/tools/measure/fmt_speed.v file.v$VMODULES/cache/vpm.log if not running in debug mode (#21192)--also-filter-submodules flag (#21259)vtest-self.v: remove dead paths, fix json2 essential test path (#21267)v install sdl && v run ~/.vmodules/sdl/setup.vsh works againv ~/.vmodules/sdl/setup.vsh, to prevent future vpm regressions (#21306)v run cmd/tools/oldv.v --show_VC_commit weekly.2024.03discord.v in apps and modules test (#21322).vdocignore (#21320)v test-self vlib/ and v test-self cmd/ (#21326)v install elliotchance.vsql in v_apps_and_modules_compile_ci.ymlv retry -- cmd to replace .github/workflows/retry.sh cmd, where possible in
v_apps_and_modules_compile_ci.yml (#21336)v symlink -githubci diagnostic message, when used outside CIs or with sudo (#21340)-cc gcc -cstrict (#21347)-gc boehm job (since -gc boehm is the default now) (#21352)binary_artifact.yml (#21364)check_os_api_parity.v (#21371)bootstrapping_ci.yml trigger paths (#21394)bootstrapping_ci.yml (#21393)v up in V folder produced by extracting a .zip release filev up, only ./v , not any matching folderv up doesv up executes failsv up runs (#21401)fmt (#21430)vet_errors and vet_notices from parser (#21424).github/workflows/show_manual_release_cmd.vsh, to make cross platform testing of the release
process easierdocker_ci.yml (#21446)parse_file, remove parse_vet_file (#21444)./v symlink -githubci in vinix_ci.ymlvvet/errors.v (#21449)v test-cleancode and v fmt -inprocess -verify . (#21450)./v symlink work platform independent in CI (part 1) (#21453)v retry --, move
v test-cleancode upwards to save time for unformatted PRs (#21452)v up (#21464)v symlink without -githubci for regular symlinking (#21455)vet_test.v (#21457)vet_fn_documentation, skip vetting empty lines (#21465)v symlink -githubci (#21471)v doc tool happen toov fmt -w cmd/tools/vdoc/vdoc_test.v/usr/libdata/pkgconfig for FreeBSD base packages (#21151); split char on windows (#21291)macos-14 too, so it runs on M1v install for the FreeBSD instance that updates docs.vlang.io .-cstrict; run macos ci also on the arm runner (#21408)v instead of ./v in the platform linux/macos/windows/_ci.yml files (#21454)v -Wimpure-v -os windows vlib/os/os_stat_test.v-cc clang on FreeBSD in cmd/tools/vtest_test.v (#21534)20 March 2024
new_map := {...old_map, 'k1': 1, 'k2': 5} (#20561)@[_linker_section] attribute (#20629)@[export] for global variables too (#20649)pub fn on_c_main() {, is now pub fn on_c_main(should_trace_c_main bool) {option or result return type, for infix operator overloading (#20494)@[noinit] attribute, through using T{} (
#20516)@[deprecated] attribute for consts (fix #20523) (#20550)non_opt_array << optvalue (#20573)mut static x := map[string]int{} (#20596)#define X and asm riscv64 {} blocks in .v files, with -freestanding (make embedded
usecases easier)(x) := 10 (#20695)none as match cond (#20688)x as Y.field, suggesting using (x as Y).field instead for clarity (#20725)arg_typ_sym.embed_name() when there are no errors (#20820)Flags.bit ^ Flags.bit1 and ~Flags.bit (flagged enums) (fix #20925) (#20929)@[translated] (#20935)@[translated]\nmodule ... files (#20938)@[translated] files (#20964)check_ref_fields_initialized methods (#21016)Optional and Result high val in a for x in low..high { loop (#21043)sort or sorted (fix#20436) (#20485)MyEnum.from(1)! generic static method (#20411)MyEnum.from(0)!, implement MyFlaggedEnum.zero() (#20623)@include template directives (#20628)scope &Scope = unsafe { nil } fields (#20774)builtin are
preparsed) (fix #20606) (#20611)-silent -print-watched-files mode (used by v watch) (
#20873)Text file busy; code: 26 case), bump
tool_recompile_retry_max_count from 3 to 7v -b js file.v commands are run at the same
time (all trying to recompile the JS backend program) (#20631)./v -freestanding -cc riscv64-elf-gcc -d no_main -no-builtin -no-preludes -showcc -keepc x.vos, of $
embed_file(), when compiling with -freestanding (#20712)new_reader_from_file/2 (#20530)is_hex(), is_int(), is_bin(), and is_oct() methods to the string type (
#20540)io.Eof, instead of error('none') (#20619)-d gc_warn_on_stderr, to show the GC warnings, without installing a custom warn
fn callbackmath.max_u32 in favour of builtin max_u32, remove
unneceseary bits, reorder (#20838)encoding.txtar (port of Go's txtar module) (#20874)C.tm (a BSD and GNU extension) (#20907)@[json: '-'] (improve backwards compatibility with the json
module) (#20892)string_reader submodule (#20893)-prod -cc gcc bug, affecting os.open_file (fix #20923) (related to #20872) (
#20960)-prod -cc gcc 13.2.0 (fix #20506) (#20660)$if debug_ev_callback ? { for the
[vweb] error: write event on connection should be closed messageindex.html inside (#20784)/sub.folder/a_folder (#20863)-prod -cc gcc bug (#20872)x.filter(cond).len > 0 to x.any(cond), and x.filter(cond) == 0 to x.all(!cond) (
#20513)none (fix #20711) (#20717)ull suffix, which looks like the cause for the first scanner error in PR#20726 (#20750)is condition when using interface (#20952)@[hidden] (#21035)$VMODULES dirs (#20977)$VMODULES (#20989)src dir (#21060)mut: keyword (#21062)!sh [COMMAND] (#20496)print and println after the execution of for or if (fix #20524) (
#20525)v check-md doc/docs.md (most common)./v cmd/tools/vtest.vv test-self
too (#20815)v check-md . more informative (#20819)v -shared -os windows file.v on Linux/macos (fix #20445) (#20453)#pkgconfig bdw-gc-threaded where available, instead of #pkgconfig bdw-gc (on
FreeBSD)v cmd/tools/vcompress.v on FreeBSD9 January 2024
@[aligned] and @[aligned:8] attributes for structs and unions (#19915)$if T is $array_dynamic { and $if T is $array_fixed { in addition to
$if T is $array { (#19882)-W impure-v the default (#19940)0 to reference fields now requires unsafe blocks (fix #14911) (#19955)r and R switches for repeating in string interpolation, '${"abc":3r}' == 'abcabcabc' (
#20197)$string comptime type, cleanup (
#20233)if o != none { (#20275)is operator and smartcasting (#20315)none
$for i in struct.values and $for i in enum.fields (#19845)more than 1000 possibilities in match range to a notice (#19862)import some modname as _ in the same .v file (fix #19899) (#19900)unsafe (#19977)$for (#20057)string to enum error check, handle EnumName(string_variable) too (#20210)or {}
block) (#20266)len: (fix #20272) (#20279).free() method calls, when used on fixed arrays (#20320)string to voidptr cast entirely (#20351)-fno-strict-aliasing, for -prod to gcc/icc (#20368)-skip-unused for programs that import x.vweb too (do not skip unused routing
methods)-W impure-v the default (#19846)join_path (#19877)Direction pub and fix and add tests for push_many (#19983)compress.szip module, deprecate the szip one after 2023-12-31 (#20003)XDG_CACHE_HOME, if it is non empty, and it does not exist
yet, when calling os.cache_dir() (#20046)mv_by_cp for directories (#20154)draw_slice_filled() (#20182)@[direct_array_access] to js string trim_right method (#20222)time.Time (#20228)map_from/1 (#20294)v -N test vlib/cryptochar and usize types for describing more precisely the C API of mbedtls (
#19837)read_set_cookies function (#20187)takeover_conn (#20249)-d no_vschannel on windows, to fix long waits, while connecting on some
systems (#20265)$vweb.html() integration in cgen for the newer x.vweb module (fix #20204)@[if xyz?] fn init() {}, add tests (#20096)none (#20349)[attribute] to the new @[attribute] syntax (#19912)__global() (#20004)v doc -run-examples math, to ensure that all // Example: code doc comments are
working (#19852)v help in the prebuilt v executables from the zips in the releaseshttp installs, when installing from an url (workaround) (#19914)v up, by not deleting ./v when missing a .git folder (#19965)-d network (#20177)-d debugscanner to -d trace_scanner for uniformity with the other tracing
options, described in CONTRIBUTING.md-n option, silencing only notices (#20331)diff tool (#20369)wb mode creation of text files containing crlf on Windows (#20101)@[nonull] is no longer needed (#20286)11 November 2023
encoding.xml module with parser, validation, entity encoding, unit tests (#19708)@VCURRENTHASH to replace C.V_CURRENT_COMMIT_HASH (#19514)Request.cookies map has been deprecated. Replaced with Request.cookie() and
Request.add_cookie().field ?&Type without default value (#19786)set_all + clear_all methods to [flag] enum bitfields (#19717)import math { sin, cos } (#19738)-dump-defines - to help explore all the available user and
system defines for a given program (#19576)-macosx-version-min 10.2 and -macosx-version-min 0 (with default
of 10.7) (#19626)v run file.c.v (#19745)unsafe { a.reset() } method, for quickly setting all bytes in an array to 0execute_opt (#19723)math to builtin so that the entire math module
doesn't have to be imported(#19809)$if tinyc { conv.hton16(port) } $else { u16(C.htons(port)) }-W impure-v as default) (#19779)-no-builtin (generate executables < 1KB Linux with
v -no-builtin -b native examples/hello_world.v)$if native {} (#19500)$embed_file(r'/some/path') expressions (#19753)@LOCATION, for more convenient logging/tracing, without needing to combine
@FILE, @LINE at runtime (#19488)VFLAGS=-no-parallelVPM_NO_INCREMENT env var to skip dl count increment when testing vpm (#19756)v build-tools, make v test more robust (#19803)v.mod file, to install external urls via vpm (#19825)v init with project names containing dashes (#19619)30 September 2023
a.sorted(|x,y| x > y) (#19390)-os plan9, $if plan9 {, and _plan9.c.v (stage 1 for plan9) (#19389)import flag as _else branch in [flag] enum match (#19375)each(a, |x| println(x)), i.e. using lambda expressions, when expecting fn (x int)const source = $embed_file(@FILE).to_string()sql as name (#19298); support for module x;_ := [10]?int{}) (#19392); statements, allowing for oneliners like
./v -e 'import os; println( os.ls(os.args[1])!.sorted(a > b) )' vlib/math (#19345)-fast-math, passing either -ffast-math or /fp:fast (for msvc) to the C backend,
and $if fast_math { to detect it at comptimesrc/modules and modules (#19437)v run file.v, exits by a signal (fix
#19412) (#19471)MMM support for parse_format() (#19284)?int to !int (#19311)@VEXE as an anchor, so v help will work more robustly.to_toml for complex structs (#19338)v -e "import net.http.file; file.serve()" (#19348)unescape() (#19267)references attribute to allow foreign key declarations on fields (#19349)[references] (#19387)-d trace_cgen_stmt, document it in CONTRIBUTING.mdtype VType = &C.CType (#19452)v test-parser, that will show the partial source that caused the parser to
fail with -no-builtin -check-syntax file.vlib (#19444)libgc-threaded on FreeBSD, to get the threaded version of libgc (#19294)3 September 2023
array.sorted() and array.sorted_with_compare() methods, that do not modify their
receivers (#19251)Enum.from_string(name string) for converting strings to enum values (#19156)@[attr] syntax to replace [attr] ([] is used for too many things). Most likely to be
replaced with @attr() in the future.none for not first values on map initialization (#18821)arr[1..4] now requires unsafe if the slice can modify the original immutable array.nil to struct fields (#18725)$tmpl function type mismatches (#18826)@STRUCT in static methodsnone, i.e. type Abc = none (#19078)Checker.expr_or_block_errthread as var name (#19174)chan type (#19167)enum, sum type and alias (#19043)const x := 123, to make extracting locals as constants less annoying while prototypingfor i++; i<10; i++ { (fix #18445) (#19035)\_ (fix #19131) (
#19134)builtin.wchar, to ease dealing with C APIs that accept wchar_t* (
#18794)Block.new, to replace new (#18846)Log instance (
#19242)parse_format with YY (#18887)isqrt_checked and standardize error format (#18939)v -os wasm32_emscripten examples/2048/create_image function (#19015)-d show_fps background, so fps>100 will not overflow itarrays.uniq, arrays.uniq_only, arrays.uniq_only_repeated,
arrays.uniq_all_repeated, arrays.distinct-d builtin_writeln_should_write_at_once and
-d builtin_write_buf_to_fd_should_use_c_write (#19243)!string on decode (#18928)pg, mysql, sqlite, mssql modules. Leave only the db. prefixed
db.pg, db.mysql etc<< and >> has higher precedence in the generated C code, than arithmetic
operations (diff between C and V precedences) (#18814)fn f() ?(int,int) { return g() } (#18851)v doc (#19001)v should-compile-all -c examples/, which will delete all the produced
executables at the endv run cmd/tools/performance_compare.v toooldv SAME_COMMIT -c "./v file.v", not use the network at allv help test, run CI checks on help markdown
files as well1 July 2023
This release has a combined changelog from 0.3.1 to 0.3.5.
You can read it here:
https://github.com/vlang/v/blob/master/changelogs0.x/0.4.md
29 June 2023
-use-coroutines and
coroutines.sleep() instead of time.sleep(). They work with IO and net, but not with GC
for now.spawn now spawns system threads, go spawns coroutines.Foo.new() to replace factory functions like new_foo().if sum_type is Foo && !sum_type.is_info && get_name(sum_type.info.name) == 'foo' .fn f[T](x T, i int, f_ Fn[T]) T { .byte deprecated in favor of u8 (byte is automatically converted to u8 by vfmt).Result type aliases (type Foo = !Bar) and Result in maps (map[key]!Type).a << none, where a is []?&int.else branches in a match.C.stat, C.sigaction, etc.array.delete calls._ = <- quit.enum val and const as fixed array size.[json:'alias'] to change its string values.[json:'-'] and [sql:'-'],
in addition to [skip]. This allows having custom behavior for different serialization methods.mod_inverse.stbi.load().resize_uint8 function for resizing images in memory.for loop for copying data.[vweb_global] and shared.get_tag() methods to find first tag occurrence.[skip] and [sql:'-'] fixed.[N]chan (fixed arrays of channels).$res comptime function to get returned value in defer block (#18382).v ls --install -p D:\path\vls.exe to install a local vls executable.30 Apr 2023
The following changes may break compilation of existing code or change behavior at runtime:
json: enums are serialized as strings by default, [json_as_number] attribute can be used for
the old behavior.
If you are serializing enums to JSON in your application, then you will need to add the
[json_as_number] attribute to keep the old behavior!
Variable shadowing has been completely banned (previously variable names could conflict with module names).
.not_found() method for custom 404 pages in vweb.builtin module, and a pure V WASM
serialization library.v share file.v for sharing code via the playground.v up speed up for when it hasn't been run for a long time (vc/ bootstrapping has been
optimized).v init no longer overwrites existing src/main.v.v self now uses a faster TCC backend on macOS (Intel/Apple Silicon), just like on Windows/Linux.-e for running short V programs on command line: v -e "println(2+5)" (
works just like in Perl).-ldflags option, in addition to -cflags. Works just like LDFLAGS in C.![] (Result of an array).
This allows handling/propagating DB errors and simplifies working with ORM (one way).limit/offset/order by/where; support of reference objects
in insert; struct fields can be used with limit/offset; Connection interface.like operator:users := sql db {
select from User where name like 'Bob%'
}
-d trace_orm option to see all SQL queries generated and used by V ORM and
-d trace_pg_error to trace PG errors.termios module.net.ssl: types using ssl contexts can now be converted to strings via .str()/printed
via println().v.reflection: added type symbol info metadata.crypto and math modules have been updated to use Result instead of Option.datatypes.LinkedList[map] now works correctly.urllib.Values.get() now returns an Option.strconv: v_printf() was made private, v_sprintf() was deprecated. String interpolation
should be used instead.net.http: mime types have been updated to include all official types.gg: create_image() now returns !Image instead of Image, allowing to handle errors.sokol: errors during image creation no longer result in a panic, but can be handled by the
programmer.sokol: macOS apps can now be quit using Cmd+Q.os.hostname() and os.loginname() now return Result.strconv.atoi optimizations.println() now supports arrays with recursive references.termux: support for cross-compilation from termux to other platforms.readline module now works much better on macOS: key navigation, history, etc (now on par with
Linux).os: fixed a memleak in getline().os.Process now has a create_no_window option (Windows only).os.Process now has a set_work_folder() method to set the initial working folder of the new
child process.Final steps in making the Option type a first class type:
Option functions.
Such fields can now also be assigned to other fields/variables.none can now be cast to all Option types, including aliases.?&Type.Options are now allowed.foo := Foo{}, when Foo has an Option field, that is a struct, that has a [required]
tag on its fields.$for item in MyEnum.fields {
println(item.value)
println(item.name)
}
$option as a compile-time reflection type representing an any Option type.$int, $enum, $option, etc).[required] fields are now checked for embedded structs.first/last/repeat can now be used in custom user types (previously they only
worked in builtin arrays).struct Foo[T, U] {
a T
b U
}
foo := Foo{
a: 2
b: 'x'
}
println(foo)
a := unsafe { nil }
println(*a)
[spawn_stack: 131072] function attribute for controlling the max size of the stack of the
spawned threads.or block: ch := <-self.item or { return none }it has been renamed to index in array inits.30 Jan 2023
go foo() has been replaced with spawn foo() (launches an OS thread, go will be used for
upcoming coroutines instead).// vfmt off and // vfmt on for turning off the formatting locally for short
snippets of code.
Useful for keeping your carefully arranged matrices intact.match x { const1...const2 {} }[live] is now supported in imported modules, not just the main module.all.children := { "abc": rect, "def": ui.rectangle()}.$embed_file() fixes, including variable args support.none fixes: no longer allowed to be used as a separate type, dump() support, not allowed
inside unsafe.const y = term.yellow, then println(y('abc')).typeof[T](), sizeof[T](), isreftype[T]() functions.-error-limit in favour of the documented -message-limit option.len: is required when using default values for the array.[]u8 arrays creation.type Alias = map[string]Alias).[] is now used for generics instead of <>.or {} block outside unsafe.cannot use literal signed integer as u8.math.vec module for generic vector math including 2D, 3D, and 4D vector operations.Optional have been replaced
with Option.gg.Context pipeline has more effects, including the additive effect.os: refactor err == IError(os.Eof{}) to err is os.Eof.x.json2, the pure V json encoder, soon to become official.v.reflection module for runtime reflection.os.mv(), which now works consistently even across different windows drives/mount
points.string.trim_indent(), useful with multi line strings, that start/end with new lines and
indentation.crypto modules.math.util and math.mathutil have been removed.time.format_rfc3339().encoding.html.escape().hash and encoding.base32 modules have been documented.crypto.pem module.map.reserve() method.where.sqlite module; sqlite.get_affected_rows_count().pg compatibility with older PostgreSQL versions before 2014.sqlite, pg, mysql have been moved to db.sqlite, db.pg, db.mysql.$if x is Type {;
$if T in [$Array, $Struct, $Alias, $Function] {.$for in works with alias types.field.is_<field>, field.is_alias, field.is_enum.make support for OpenBSD.v install pcre on Windows (it now bundles its own .c files, so it
compiles cleanly, even if the platform does not have another pcre package installed).makev.bat & v up improvements on Windows.v -test-runner teamcity foo_test.v.v -show-timings.v new <name> web for quickly scaffolding new web projects.31 Oct 2022
println("Hello, {name}!"). It will be the only way, old
syntax (${name} and $name)
will be deprecated.return MyCustomErr{} instead of return IError(MyCustomErr)..0 conditionally appended to them to improve clarity.enum Xyz as u64 {.unsafe{}.sync.Pool.-skip-unused fixes, soon to be made the default.No breaking changes
if is now checked.net.ssl has been migrated from a dynamically linked OpenSSL to a statically linked Mbed TLS.
This means that V binaries will no
longer have an OpenSSL dependency. OpenSSL can still be enabled via -d use_openssl.v install msgpack)datatypes.datatypes.LinkedList<T>, forward and backward iterators for
datatypes.DoublyLinkedList<T>.maps module, similar to existing arrays. It has generic filter, flatten, invert,
to_map, to_array, from_array
functions.utf8.is_number(), utf8.is_space() functions.encoding.base32 module.gg.TouchPoint to differentiate between different types of touch input.str.int() conversion speedup (without -prod).vweb.csrf module.select from User where (name == 'Sam' && is_customer == true) || id == 1.[console] attribute in Windows GUI apps.-trace-calls.31 Aug 2022
nil. Only to be used inside unsafe. Replaces voidptr(0).src/ directory. This allows making V repos much cleaner.assert condition, extra_message, where the extra_message will be evaluated and shown
if the assertion fails..c.v files.shared types.os.mkdir() now has an optional mode parameter.encoding.csv is now generic, supports bools, accepts a custom delimiter, and is compatible with
io.Reader/io.Writer.datatypes module now uses operator overloading.datatypes types can be converted to V arrays.smtp improvements including multiple recipients and base64/utf8 support.arrays.carray_to_varray<T>() for converting C arrays to V arrays.strconv.v_sprintf() has been deprecated in favor of string interpolation.[toml:...] attributes, just like the JSON module.os.walk() is no longer recursive (still works the same).io has been migrated to Result.string.replace_char(), math.round_sig().math.big.net.urllib ipv6 support.net.Http.Response.text renamed to body.net.websocket timeout is now configurable.Result, so the errors can be handled.#preinclude for low level C interop.$if termux {, more predictable logging on Android.v.c distributed on non-Windows systems. (v_windows.c is
used on Windows.)vgret and is compared to the expected result.v ls tool for installing, for updating, and for launching VLS (V Language Server).v doc now has syntax highlighting.30 Jun 2022
v translate file.c. (Demo
video: Translating DOOM from C to V, building it in under a second and running it!)Option and Result are now separate types: ?Foo and !Foo respectively. Old code will
continue working for 1 year and will result in a warning/hint.m[bad_key] or { ... }, if x := arr[key] { ... }.ustring has been replaced with []rune (works just like in Go).v self). It eliminates unreachable branches and performs other simple optimizations and
transformations.byte has been renamed to u8. Old code
will continue working for 1 year and will result in a warning/hint.datatypes module now has Heap, Queue, Stack, BSTree, LinkedList.[]int{init: it}).>>> and >>>= have been added to V. (They work exactly like in
Java.)-nofloat option, which is useful for writing kernels and for embedded systems without an FPU (
used in Vinix).unsafe only (for example, for C interop).unsafe.compress.gzip.net/net.http/vweb fixes (also used for the upcoming Gitly launch).net.http headers are now enum fields instead of strings. This allows to avoid typos and offers
autocomplete.rand).[heap].regex module.gg.draw_polygon_filled(), gg.draw_arc_empty() etc)gg.gg.[minify] struct attribute for struct minification.for in now works with fixed arrays.vfmt code when not in vfmt mode (by using
-d vfmt).#[index] syntax for negative indexing (like in Python, but needs special syntax
instead of being used by default).pub).foo(bar()?)).const x := opt() or {}).sync improvements including sync.thread_id(), sync.Once..foo.o) that can be used in existing C projects.-usecache and -skip-unused fixes, they are close to being on by default.term.ui improvements, including multi byte/UTF-8 events.crypto modules, including crypto.des, crypto.cipher, crypto.blowfish.-d 4bytebool) for compatibility with some C software.strconv (pure V formatting module used in string interpolation) fixes and performance
improvements.volatile keyword."stringliteral".len optimization (replaced by the actual number by the new transform pass).math module.1_000_000.strings.Builder optimizations and new methods.-autofree flag).v -b go -o file.go file.v).30 Aug 2021
isize and usize types, deprecate size_t in favor of usize.datatypes and datatypes.fsm modules.compile_error and compile_warn comptime functions.sprintf
was used.unused variable warning. Assigning to a variable no longer marks it as used.
... lots of missing changelog for this version, sorry (will update a bit later)22 Jan 2021
vweb now uses struct embedding: app.vweb.text('hello') => app.text('hello').const() blocks: const x = 0.>, <, !=, ==, <= and >= operators.User{ ...u, name: 'new' } to replace { u | name: 'new' }.byte.str() has been fixed and works like all other numbers. byte.ascii_str() has been added.for mut x is string {}.[noinit] struct attribute to disallow direct struct initialization with Foo{}.[1, 2, 3]... is now ...[1, 2, 3]enum as int and operations on enum except == and != are removed for strict type
checking.[manualfree] fn f1(){} and [manualfree] module m1, for functions doing their own
memory management.< and > operators for struct in .sort method for arrays, i.e.
arr.sort(a < b).+=, -=, *=, /= and %= if the operators are
defined.go with a generic function: go test<string>(c, 'abcd').x := $embed_file('v.png') println(x.len) println(ptr_str(x.data())), for embedding
files into binaries.left()/right were removed in favor of slicing syntax: str[..pos].__offsetof for low level needs (works like offsetof in C).$env('ENV_VAR').== and < operators and auto generate !=, >, <= and >=.dump(expr), i.e. tracing of both the location, name and value of an expression30 Dec 2020
fn sum(i ...int) int => a := [2,3,4] println(sum(a...))22 Dec 2020
-autofree (not production ready
yet). Video demonstration.shared.io.Reader, io.Writer etc).net module is now non blocking and is more feature complete providing similar API to Go.if x.expr is int { println(x.expr + 1) }.users.sort(a.name > b.name).vfmt fixes and improvements. It has now reached a point where it can be safely
used on any V source file.v fmt -verify on the entire code base, a new command that makes sure the
file/directory
has been vfmt'ed. This ensures that all code submitted to the V project is formatted.v vet for analyzing the project and finding potential bugs and errors.term.ui module for building dynamic terminal UIs with an example editor written in it.it variable has been replaced with smart casts (the change is completely handled by vfmt).foo(5) instead of foo<int>(5).-usecache. Faster compilation due to not needing to rebuild the entire vlib
for
each program. Will be enabled by default in 0.2.1.break and continue.modules.vlang.io is now generated automatically on every commit.time.Time.array.contains(element) is now generic.foo(a int, b int, c string) instead of
foo(a, b int, c string)#pkgconfig flag to provide platform independent way to get compilation flags for C
libraries/packages.println was made even smarter, and can now handle complex types.$tmpl().['/:arg1/:arg2/action'] vweb action attribute for easily getting query parameters assigned to
method arguments.gg.text_width().[export] attribute to change exported function name (for example for calling from a C library).unsafe fixes and improvements.rand.ulid(), rand.uuid(), a unified customizable PRNG API.5 May 2020
strconv, sprintf, and printf in native V, without any libc calls.map() and filter() methods can now be chained.[]int{cap:cap, len:len} syntax for initializing array length and capacity.is keyword for checking the type of sum types and interfaces.as can now be used to cast interfaces and sum types.-profile. Prints a nice table with details about every single function call:
number of calls, average time per call, total time per functionimport(xxx) syntax has been removed in favor of import xxx for simplicity and greppability.time.StopWatchdl module for dynamic loading.str() method generation for every single type, including all arrays.foo(bar:0, baz:1).!in.net.websocket module (early stage).vlib is now memory leak free, lots of autofree improvements.cmd/v, v.builder.1 Apr 2020
31 Dec 2019
type Expr = IfExpr | MatchExpr | IntegerLiteral).v fmt -w.is_link(), is_dir(), exists().malloc()/free().++ is now required instead of += 1 for consistency.println('val = $get_val()').string.replace_each([]) for an efficient replacement of multiple values.-prealloc option for block allocations.type aliases.v with an unknown command will result in an error.atof implementation in pure V.filepath module.math.factorial.ftp module.val as Type.30 Nov 2019
-freestanding flag, to build programs without linking to libc.string.index() now returns ?int instead of int/-1.v up have been split up into separate applications to keep the core V compiler small..green instead of Color.green) when it's enough.[]interface support.os.cp() for copying files and directories.$if clang, msvc, mingw, x32, x64, big_endian, little_endian {.-enable-globals flag)
for low level applications like kernels and drivers.if bool(1) { worked).<< and >> now work with all integer types.%, |, & etc).println(true) now prints true instead of 1.os.exec() now uses CreateProcess on Windows.****int).$if os { blocks are now skipped on a different OS.c'hello').foo()? syntax for error propagation.doc/docs.md.eventbus module.malloc/free on bare metal.utf8 helper functions (to_lower(), to_upper(), etc).for c in str {.string/array.left/right/slice/substr were removed (use [a..b] slicing syntax instead).28 Oct 2019
fn foo<T>(bar T) T {) with varargs support.array[start..end] and string[start..end] slicing syntax.array.filter() and array.map().sqlite module.[][][]int).unsafe.[deprecated] attribute.[if] function attributes for compile time function exclusion for performance.switch has been completely removed from the language and replaced by
match everywhere.pub struct and pub const, previously all structs and consts were public
by default.musl support (V can now run on, for example, Alpine Linux).color in [.green, .red, .blue] now works without specifying Color.green.runtime.nr_cpus().fn init() for module initialization.a in [1, 2, 3] optimization: no array gets allocated.s := r'hello\nworld'.if a := func() { } syntax for handling options.30 Sep 2019
none keyword for options.none.fn foo(bar int, params ...string) {.") can now also be used to denote strings.-compress option. The V binary built with -compress is only ~90 KB!.str() method generation for structs and arrays._ is no longer a variable, but an actual syntax construct to skip unused values, like in Go.fn foo() (int, string) {).! can now only be used with booleans.17 Sep 2019
gcc v.c now builds without
any warnings.|, ^, & no longer work with booleans.12 Sep 2019
[inline] attribute.mysql module.struct User { last_name string [json:lastName] }.[raw] attribute.freetype module.gg module can now render all Unicode characters.[typedef] attribute for imported C struct typedefs.foo[0] += 10 is now possible.import const was removed from the language.array.contains() was removed from the language (in should be used instead).[0; len] syntax was removed (replaced with a simpler [0].repeat(len))readline module.v build module.@FILE, @LINE, @FN, @COLUMN for debugging.16 Aug 2019
uk_customers = db.select from Customer where country == 'uk' && nr_orders > 0).m := { ‘foo’: ‘bar’, ‘baz’: ‘foo’ }.map.delete(key).libcurl dependency was removed from the http module.http functions now return options.sync.WaitGroup.vweb static files serving.crypto.rand module.v up to update V.net.urllib module.v install.() are now required in complex bool expressions: (a && b) || c instead of a && b || c..str() method.≠ etc support.encoding.csv module.$if debug { for running code in debug mode only.json functions can no longer be used if the json module is not imported.29 Jul 2019
vweb module for developing web apps in V.foo.$method() where method is a string).@ for escaping keywords (e.g. struct Foo { @type string }).sync module for Windows.#! support on Unix systems (V scripts).crypto.aes and crypto.rc4 modules.23 Jul 2019
match expression (replacing switch).crypto/md5, crypto/sha256, and crypro/sha512 modules.os.executable() - a cross platform function that returns full path to current executable.~/.vlang and VROOT were removed entirely. The installation is a lot cleaner now.string(bytes_buffer, len), string(bytes_array) casts.defers.key in map syntax (replacing map.exists(key)).15 Jul 2019
defer statement.for key, val in map syntax.flag module for parsing command line arguments.zip module.crypto/sha1 module.import encoding.base64 as b64).12 Jul 2019
gg module Windows support, V Tetris runs on Windows.glad and cJSON only once. Programs using gg or json compile a bit faster.v.c has been cleaned up and minimized (~16k => ~10k lines of code).type aliases can now have methods.byte(1000) will no longer compile).10 Jul 2019
token == .name), enum values are no longer global consts.import encoding.base64).err variable for getting error values.<< can now append arrays (numbers << [1, 2, 3]).>> 2 + 3 works now, no println required).4 Jul 2019
os module now uses options in all functions that return File.println was optimized. It no longer results in allocations.
Now it also works correctly with all integer types.vfmt fixes, it will be enabled tomorrow.strings module.1 Jul 2019
29 Jun 2019
mut var := val was fixed (previously mut var = val was allowed as well).28 Jun 2019
fn main now work as expected.27 Jun 2019
# syntax for embedding C code has been removed.pub, all public vlib functions have been updated.tos2(bytes) => string(bytes).