Releases: vlang/v
Releases · vlang/v
weekly.2025.28
releases: weekly.2025.28
weekly.2025.27
releases: weekly.2025.27
weekly.2025.26
releases: weekly.2025.26
0.4.11
V 0.4.11
19 Jun 2025
Improvements in the language
- Support a new CPU architecture s390x (#24107)
- Add initial support for ppc64le (#24287)
- Add initial support for loongarch64 (#24343)
- Support
js"string literal"
for JavaScript strings (#24653) - VLS mode in the parser for the new language server in pure V
Breaking changes
- Remove deprecations made before 2024-11-06
- Add a deprecation note for
any
arg, preventany
from being used as map key,value or array type (#24277)
Checker improvements/fixes
- Fix chan element type validation with inexistent type (fix #23978) (#24008)
- Do not allow auto (de)reference in PrefixExpr *
- Fix check for pushing on an unwrapped option array (fix #24073) (#24093)
- Fix wrong type hint on predicate arg type mismatch (fix #24122) (#24123)
- Fix array generic return checking (fix #24104) (#24214)
- Fix stack var outside usage when var is a mutable param (#24249)
- Fix codegen for multi return with array fixed (fix #24280) (#24282)
- Check anon struct field valid case (partial fix of #24284) (#24286)
- Add check for recursive array init on struct (fix #21195) (#24278)
- Fix inherited var turning in auto heap (fix #24306) (#24312)
- Remove redundant callexpr
c.expr(mut node.left)
rechecks forast.CallExpr
(fix #24353) (#24380) - Do not allow &u8(0), force nil like we do with &Type(0)
- Relax the new warning, allow for
pub const pname = &char(C.SDL_POINTER)
to fix the clean compilation of code using vlang/sdl3 - Fix for with mut generic value (fix #24360) (#24426)
- Add check for decomposing to interface (fix #24441) (#24453)
- Fix generic option array arg passing to
[]T
(fix #24423) (#24457) - Fix resolver for returning struct generic (fix #24493) (#24506)
- Reallow passing closures as voidptr parameters with no warning, to enable convenient interfacing with C libs
- Disallow invalid expr for
filter
,count
,any
,all
(fix #24508) (#24540) - Replace warning by notice for UTF8 strings validation (fix #24538) (#24543)
- Revise logic for reporting import conflicts with module names (#24539)
- Fix struct update expr checking, when an alias is used (fix #24581) (#24582)
- Fix fn var resolver (fix #24525) (#24542)
- Fix checking for int to array of interface (fix #24624) (#24625)
- Cycle through all
ast.ParExpr
first inprefix_expr
(fix #24584) (#24588) - Move
arr <<
logic tocheck_append()
- Fix mutable const bug (fix #14916)
- Allow for calling main() inside _test.v files
- Fix missing type bounding to match expr on
or{}
expr (fix #24656) (#24658) - Add error for
if mut x != none {
, whenx
is an immutable option (fix #24692) (#24694) - Fix compound selector smartcasting/option unwrapping (fix #24662) (#24712)
- Fix mutable option (fix #18818) (fix #24622) (fix #24101) (#19100)
Parser improvements
- Fix parse_cflag() support other flags between allowed_flags (fix #24121) (#24146)
- Minimise allocations done for the common case in find_struct_field
- Fix orm generic struct table type parsing (fix #24049) (#24149)
- Fix mutiple imports at one line (#24241)
- Fix range expr precedence on compound logical and operator (fix #24252) (#24275)
- Fix invalid field name checking (fix #24279) (#24283)
- Fix wrong string parsing (fix #24297) (#24298)
- Fix panic for
struct Abc { pub mut: }
(fix #24404) (#24403) - Allow
mut static counter := 0
insideunsafe {}
blocks (prepare for removing a-translated
mode quirk) - Fix duplicate mod imports (fix #24552) (#24559)
- Reduce memory usage of ast.ScopeObject and ast.Ident instances (#24704)
Comptime
- Support
$if T is $pointer {
and$if T is $voidptr {
, to make it easier to implement a pure V dump(), without cgen specific code (#24628) - i32 is now
$int
too (fix #24346) (#24378) - Fix
$dbg
with@[heap]
structs (fix #23979) (#23989) - Check invalid comptime field name assignment (fix #24415) (#24421)
- Enable s390x + docs (#24114)
Compiler internals
- Remove closure usage from the compiler frontend (simplify bootstrapping/porting on more exotic platforms)
- markused: support orm or expr (fix #24040) (#24059)
- markused: fix for gated index range on string (fix #24187) (#24200)
- v.util.version: fix output for V full version when VCURRENTHASH not defined (#24264)
- markused: fix generic method call mark (fix #24395) (#24399)
- v.pref: add get_build_facts_and_defines/0 and set_build_flags_and_defines/2
- v.util.version: fix output for V full version (followup on issue #24263 and PR #24264) (#24478)
- v.util: use internal diff (#24495)
- v.pref: prevent overriding backend (fix #21758) (#24526)
- markused: fix for generic ptr receiver on method call (fix #24555) (#24558)
- markused: fix
x := t.wait()
, whent := go fn () string {
(fix #24577) (#24580) - markused: fix printing smartcasted interface values (fix #24579) (#24583)
- pref: avoid changing the backend with
.js.v
when-backend
has already been used (fix #7840) (#24654) - Remove dump() calls inside the compiler itself (make bootstrapping of dump() implemented before cgen easier)
Standard library
- builtin: string.index_after() ?int
- cli: account for initial indent on subcommands (#23985)
- Remove
strings.Builder.clear()
, fixarray.clear()
not working in the JS backend (#23992) - gg: make draw_rect_empty/5 draw more exact borders, independent of the device, and fitting the draw_rect_filled/5 shapes (#24024)
- sync: fix a helgrind false positive, for a data race, on PoolProcessor (#24023)
- sync.pool: restore the parallel operation (surrounding the cb call in process_in_thread in a lock in 1b52538, effectively disabled parallelism)
- x.crypto.chacha20: change internal cipher to support a 64 bit counter (related to #23904) (#24039)
- os: fix swap_bytes_u64 (#24033)
- x.crypto.chacha20: fix
xor_key_stream
failing after a while (fix #24043) (#24046) - crypto.sha3: be big-endian friendly (#24045)
- x.crypto.chacha20: makes the underlying cipher routine aware of the 64-bit counter (#24050)
- x.crypto.chacha20: enable support for 64-bit counter (fix #23904) (#24053)
- x.crypto.slhdsa: add a SLH-DSA implementation, a stateless hash-based DSA, a post quantum cryptographic module (#24086)
- encoding.binary: add encode_binary()/decode_binary() generic functions (#24106)
- crypto.rc4: change the return type of
new_cipher
to be!&Cipher
(#24113) - crypto: add a
crypto.ripemd160
module (#24119) - encoding.iconv: fix iconv on termux (fix #23597) (#24147)
- sync: remove the call to C.pthread_rwlockattr_setpshared (not needed, since it is the default on POSIX) (#24166)
- pkgconfig, termios: Support NetBSD (#24176)
- encoding.binary: fix serialize map struct (fix #24190) (#24192)
- builtin,v.gen.wasm: support
-b wasm -d no_imports
(#24188) - datatypes: add a Set.array/0 method to help get all the elements from a set as an array (#24206)
- json: fix option time (fix #24242) (fix #24175) (#24243)
- log: add local time / utc time selection support (#24268)
- json: link with libm (fix #24272) (#24273)
- rand: add uuid_v7(), session function, simplify uuid_v4() (#24313)
- toml: fix handling of multiline string with CRLF (fix #24321) (#24322)
- toml: fix crlf escape check (fix #24328) (#24329)
- x.json2: add u16(),u32() (fix #24337) (#24342)
- rand: fix uuid_v7 seperator (#24348)
- rand: check the separators for the generated UUIDs in random_identifiers_test.v
- builtin: add string.is_identifier() (#24350)
- x.crypto.chacha20: add a check counter overflow to set_counter for standard mode (#24365)
- comptime: fix
$if var.return_type == 1 {
(fix #24391) (#24393) - comptime: enable ppc64le, add docs (#24433)
- toml: add compile error when passing
encode/1
types of T != struct (fix #24435) (#24443) - sync.stdatomic: workaround for libatomic.a indirect symbols tcc bug (fix #23924) (#24472)
- math.big: fix the + operator for big.Integer for negative numbers, add test (#24487)
- math.big: respect the sign of the dividend in % operator, add test (#24489)
- os: add note for the availability of the debugger_present implementation (#24492)
- term: add writeln_color() (#24463)
- math.big: add missing assert for test_multiply_karatsuba_02 (#24534)
- builtin: fix mix prod and debug ucrt lib (#24498)
- math.big: fix Karatsuba's add_in_place() function, add carry handler on exit (#24541)
- math: add
exp_decay
tointerpolation.v
(#24545) - math.big: optimize divide_array_by_digit() (#24566)
- sync.stdatomic: add atomic types (#24561)
- sync.stdatomic: turn panic() in new_atomicT into a $compile_error() (#24573)
- sync: add condition support (#24574)
- builtin: flush stdout on panic (#24606)
- Document the behaviour of % for negative numbers; in V: -10 % 7 == -3 (#24604)
- math.big: remove unnecessary casting from Integer.is_power_of_2/0 (#24614)
- math.big: make is_power_of_2() be false for negatives (it now matches Julia's ispow2/1) (#24619)
- vlib: vanilla_http_server (#24202)
- os: support
dotfiles := os.walk_ext('.', '', hidden: true)
(#24617) - builtin: remove playground related code (the current playground uses a container/sandbox) (#24632)
- comptime: fix
T.indirections
comparison (fix #24630) (#24636) - math.big: add test for radix_str() and integer_from_radix() (#24644)
- runtime: make free_memory() and total_memory() return Result types to allow for reporting errors (#24651)
- math.big: improve the performance of radix_str() ~9 times (#24666)
- math.big: speed up ~10x integer_from_radix() (#24674)
- sync.stdatomic: fix bug with add() and sub() returning the new values, add voidptr support, add swap() and compare_and_swap() (#24685)
- sync.stdatomic: add atomic_thread_fence(), cpu_relax() (#24690)
- v: support
@DIR
(as a comptime equivalent toos.dir(@FILE))
at runtime) (#24742) - thirdparty: print the glGetError() code on failure too in soko...
weekly.2025.25
releases: weekly.2025.25
weekly.2025.24
releases: weekly.2025.24
weekly.2025.23
releases: weekly.2025.23
weekly.2025.22
releases: weekly.2025.22
weekly.2025.21
releases: weekly.2025.21
weekly.2025.20
releases: weekly.2025.20