|
| 1 | +## V 0.5.1 |
| 2 | +*9 Mar 2026* |
| 3 | + |
| 4 | +#### Improvements in the language |
| 5 | +- New clean and fast v2 backends: cleanc (similar to the old C backend), ssa/arm64, ssa/amd64. cleanc backend can already self host! |
| 6 | +- Add a new generic solver stage (gated behind `-new-generic-solver`) (#26280) |
| 7 | +- Refactor $var to ${var} across entire repository, make vfmt always output the newer form `${expr}` (#26494) |
| 8 | +- Fix support for match exprs with nested if exprs (#26599) |
| 9 | +- Add OS-specific headers support for #include directives (#26654) (fixes #26562) |
| 10 | + |
| 11 | +#### Checker improvements/fixes |
| 12 | +- Fix compiler panic on wrong arg count with or block (#26665) |
| 13 | +- Support gotodef for fn param and []Type (#26193) |
| 14 | +- Error for unwrapped option/result types used with in operator (fix #26208) (#26223) |
| 15 | +- Expand @VEXEROOT, @VMODROOT, DIR, $d(), $env() inside $embed_file(path) too (#26319) |
| 16 | +- Fix global empty const type check (fix #26324) (#26332) |
| 17 | +- Add error message call stack support (requested by #16127, #24575, etc) (#26356) |
| 18 | +- Fix option in struct member infix expr and swapped none comparion (fix #26351) (#26373) |
| 19 | +- Disallow `foo()? == foo` where foo returns `!string` (fix #26383) (#26403) |
| 20 | +- Unset `@VCURRENTHASH` for V build/bootstrapped outside of a Git repository (fix #26407) (#26426) |
| 21 | +- Check generic struct fields and initialisation (fix #26433) (fix #26436) (#26450) |
| 22 | +- Preserve mut in other non-none if branch (fix #26491) (#26495) |
| 23 | +- Fix sql statement using an unwrapped option value from an if guard (fix #26496) (#26505) |
| 24 | +- Add type checking for param of fn passed as generic arg (fix #26195) (#26257) |
| 25 | +- Add warning for `fn f(x u8) {} f(999)` (fix #26584) (fix #26585) (#26586) |
| 26 | +- Add passes for top level decls (fix #26306) (#26589) |
| 27 | +- Avoid panic on unresolved infix operand types in -check (fixes #26458) (#26607) |
| 28 | +- Fix shared array slice type with implicit clone (fixes #26663) (#26666) |
| 29 | +- Fix autofree crash with option/result method chains (#26694) |
| 30 | + |
| 31 | +#### Parser improvements |
| 32 | +- Disallow `[3]!int{}` (fix #26244) (#26249) |
| 33 | +- Get correct generics for generics struct fn with generic param (fix #26191) (#26251) |
| 34 | +- Fix dump() free bug for v.ast.TypeSymbol (fix #26282) (#26283) |
| 35 | +- Disallow `[T]` as fn return type (#26530) |
| 36 | +- Show where another declaration is located (fixes #26483) |
| 37 | +- Fix `pub:` not being detected in structs in -vls-mode (#26581) |
| 38 | +- Fix anonymous function name collisions across files (#26642) |
| 39 | +- Remove @[minify] from structs with enum fields (#26661) |
| 40 | + |
| 41 | +#### Compiler internals |
| 42 | +- v.comptime,v.generics: unwrap receiver type, support more generic comptime exprs (#26350) |
| 43 | +- v.generic: improve new generic stage, unwrap generic ident info, set ct_expr to false if solved, update receiver_type generic flag (#26366) |
| 44 | +- v.generics: improve the new generics stage, by fixing unwrapping in nested generic struct, also fix suggestions from previous PR (#26430) |
| 45 | +- table: fix generics crash (fix #26438) |
| 46 | +- markused: add array method map and filter support (fix #26233) (#26238) |
| 47 | +- v.pref: exit early with an error message, if coroutines are not supported yet on the current platform, instead of producing a cgen error (#26342) |
| 48 | +- builder: fix compile error message for -m32 (fix #16639) (#26353) |
| 49 | +- v.builder: add -stats for top level statements and non-vlib top level statements (#26451) |
| 50 | +- v.pref: improve musl detection; fixes __atomic_thread_fence for all musl nixes (fix #26449) (#26460) |
| 51 | +- v.builder: always apply -fno-strict-aliasing too, on `-cc gcc -prod` to avoid the need for the `-cflags -fno-inline-small-functions` workaround with gcc > 12.0 (fix #26512) (#26552) |
| 52 | +- v.scanner: optimise ident_dec_number, ident_oct_number, ident_hex_number, by using precomputed digit_table and letter_table consts, instead of u8 method calls |
| 53 | +- v.scanner: eliminate str_helper_tokens changes outside string interpolation (fix speed loss after 106da40) |
| 54 | +- markused: add typ==0 guard for MapInit to fix panic in comptime $else branch (#26652) |
| 55 | + |
| 56 | +#### Standard library |
| 57 | +- builtin.closure: improve ppc64le closure if PIE (#26172) |
| 58 | +- rand.xoroshiro128pp: prevent generation of extra zeros in u16() (#26229) |
| 59 | +- thirdparty: fix tcc __atomic_thread_fence (fix #25856) (fix #26158) (#26185) |
| 60 | +- builtin.closure: use volatile register for s390x (fix #24383) (#26256) |
| 61 | +- thirdparty: update zstd patch with commit 8aa0369 (#26312) |
| 62 | +- regex.pcre: add non-greedy quantifiers like `*?`, `+?`, `??` (fix #26579) (#26582) |
| 63 | +- regex.pcre: optimise for speed the PCRE implementation (#26609) |
| 64 | +- atomic: and/or bitwise ops (#26646) |
| 65 | +- x.json2: add a `strict: true` mode for x.json2.decode(), that rejects string-to-number type casting during decoding (fix #26082) (#26220) |
| 66 | +- builtin: add array.last_index() (#26252) |
| 67 | +- bitfield: fix pop_count(), add test (#26262) |
| 68 | +- io: deprecate the `io.string_reader` module (not used in vlib, with confusing and under tested/documented API - see #25713 ) (#26274) |
| 69 | +- time: add Duration.times/1 |
| 70 | +- os: add Pipe.write_string/1 (#26286) |
| 71 | +- gg: add .draw_ellipse_filled_rotate and .draw_ellipse_empty_rotate APIs (#26309) |
| 72 | +- gg: add draw_ellipse_thick and draw_ellipse_thick_rotate (#26327) |
| 73 | +- os: fix args quoting in win_spawn_process (fix #26261) (#26339) |
| 74 | +- gg: optimize ellipses draw functions (#26340) |
| 75 | +- gg: text_width_f |
| 76 | +- math: fix acosh() for 0.0 (#26360) |
| 77 | +- math: rewrite round() to match closely the Go version (and mpfr's one), update test (#26381) |
| 78 | +- gg: optimise the ``draw_rounded_rect_filled`` function (#26390) |
| 79 | +- os: add missing is_opened checks to File.read* functions (fix #26096) (#26413) |
| 80 | +- x.json2: add `@[json: name]` attr support for enum values (fix #26437) (#26441) |
| 81 | +- x.json2: rename Any.arr() to Any.as_array() for consistency with as_map(), as_map_of_string(); deprecate Any.arr() (#26455) |
| 82 | +- breaking,x.ttf: extract vlib/x/ttf/render_sokol_cpu.v in a separate module x.ttf.render_sokol, to enable headless programs, that do not use gg, to not depend on OpenGL, DX12, Metal etc, through sokol (#26477) |
| 83 | +- crypto.blake3: add @[direct_array_access] and improve f() performance (#26480) |
| 84 | +- crypto.rc4: add `@[direct_array_access]` (#26507) |
| 85 | +- x.crypto.slhdsa: fix slh signature testing on latest version (fix #24086) (#26519) |
| 86 | +- crypto.pbkdf2: replace a panic with an error return (#26526) |
| 87 | +- regex: fixed missing OR operation on anchor flag (#26540) |
| 88 | +- regex: new PCRE compliant regex submodule written in pure V, available through `import regex.pcre` (#26545) |
| 89 | +- x.json2: fix decoding wrong value depending on field order (fix #26503) (#26571) |
| 90 | +- crypto: add shake128 and shake256 entries into crypto.Hash enum (#26576) |
| 91 | +- vlib: add x.atomics - implement native_x86-64_atomics in V and assembly, without depending on an external C library (impl #26474) (#26529) |
| 92 | +- os: use _dyld_get_image_name() to increase compatibility with older versions of Mac OS X like 10.4 (#26617) |
| 93 | +- crypto: move up AEAD interface from experimental namespace to `cipher.AEAD` (#26632) |
| 94 | +- builtin: fix `camel_to_snake` underscore placement in uppercase runs (#26634) |
| 95 | +- time: parse_http_header_string (#26636) |
| 96 | +- flag: add DocOptions/Show to FlagParser (#26630) |
| 97 | +- runtime: fix issues with nr_cpus() (#26679) |
| 98 | +- thirdparty,sokol: add wayland support (#26682) |
| 99 | +- thirdparty,sokol: fix frame pacing issues on xwayland sessions, prevent sending some keycode events on wayland (#26706) |
| 100 | + |
| 101 | +#### Web |
| 102 | +- net: add raw sockets support (implement feature request from #19565) (#26237) |
| 103 | +- veb: remove 2 clones of response bodies; reduce the GC load for the most common case (fix #25423) (#26236) |
| 104 | +- wasm: support basic match keyword handling (#26246) |
| 105 | +- wasm: fix infinite loop using continue in C-like for loops (#26250) |
| 106 | +- wasm: add basic `for x in start .. end {` support (#26248) |
| 107 | +- wasm: implement basic string operations (#26260) |
| 108 | +- veb: fix double-send error when after-middleware sends response (#26270) |
| 109 | +- builder,wasm: fix pointer size to 4 for `-b wasm` before the checker stage (#26281) |
| 110 | +- wasm: support basic string interpolation (#26288) |
| 111 | +- wasm: fix string plus assign with call expr (#26287) |
| 112 | +- wasm: handle `for` in strings and FixedArrays (#26290) |
| 113 | +- wasm: support WASI program arguments and IO functions (#26294) |
| 114 | +- net.mbedtls: increase default timeout to 10s (like in Go): 550ms was too low |
| 115 | +- net: add jsonrpc module (#26330) |
| 116 | +- fasthttp,veb: static files via sendfile |
| 117 | +- wasm: fix size of pointers in structs (#26357) |
| 118 | +- thirdparty.mbedtls: upgrade to v3.6.5 (#26365) |
| 119 | +- wasm: only compile `.wasm.v`, and platform independent `.v` files (#26386) |
| 120 | +- fasthttp: fix sendfile (#26402) |
| 121 | +- wasm: add run support with wasm-micro-runtime/iwasm (#26417) |
| 122 | +- veb: fix unset Content-Length header, in responses with an empty body (#26431) |
| 123 | +- veb: fix error lines for html templates via source to source mapping |
| 124 | +- net.http: enable test for relative redirects (#26513) |
| 125 | +- fasthttp: fix IPv6 support (fix #26548) (#26549) |
| 126 | +- mbedtls: better ux around client timeout by mentioning the mbedtls_client_read_timeout_ms flag (#26574) |
| 127 | +- Document `$veb.html()` too in the compiler error messages, as a known comptime function (#26605) |
| 128 | +- fasthttp: remove zero-byte initialization in read buffer #26640 |
| 129 | +- net.http: stop reading after Content-Length bytes on keep-alive responses (#26669) |
| 130 | + |
| 131 | +#### ORM |
| 132 | +- Add explicit JOIN support (INNER, LEFT, RIGHT, FULL OUTER) (fix #21635) (#26400) |
| 133 | +- Support embedded structs |
| 134 | +- Make work with generic structs |
| 135 | +- Fix generic struct creation inside a generic function |
| 136 | +- Resolve generic inserting object type |
| 137 | +- Cgen bug fix (fixes #25847) |
| 138 | +- Handle inserting enum fields (#26680) |
| 139 | +- Add aggregate function support (#26697) |
| 140 | +- Add transaction API with savepoint-backed nesting (#26707) |
| 141 | + |
| 142 | +#### Database drivers |
| 143 | +- mysql: use correct link flag for both tcc and msvc (#26539) |
| 144 | +- pg: exec_no_null(); gx: remove deprecated test; parser/tmpl: %raw translations; veb: time_to_render() |
| 145 | +- fix(db.sqlite): replace vstring() with tos_clone() to prevent use-after-free (#26700) |
| 146 | +- feat(db.sqlite): add Row.names, get_string/get_int, and improve exec_map (#26702) |
| 147 | + |
| 148 | +#### C backend |
| 149 | +- Fix multi dim fixed array with opt elem (fix #26243) (#26258) |
| 150 | +- Fix array.contains() when right is ref (fix #26253) (#26255) |
| 151 | +- Ast,checker,cgen,parser: fix comptime $if assign expr (fix #26061) (#26242) |
| 152 | +- Promote non generic sumtype pointer initialiations to the heap too (#26285) |
| 153 | +- Fix generic function error propagation type mismatch (fix #26263) (#26295) |
| 154 | +- Fix interface pass string ref arg (fix #26293) (#26296) |
| 155 | +- Fix shared array assigned call expr with fixed array (#26320) |
| 156 | +- Fix fixed array of option with different size (#26326) |
| 157 | +- Fix call with fixed array of builtin struct (#26328) |
| 158 | +- Fix array init with option array (fix #26329) (#26331) |
| 159 | +- Fix alias indent (fix #26272) (#26333) |
| 160 | +- Fix chan autostr (fix #26337) (#26338) |
| 161 | +- Transformer,markused,cgen: fix some problem for array init when use `-new-transformer` (#26341) |
| 162 | +- Fix `-assert backtraces` after e317c63 |
| 163 | +- Fix for function-like macro '_BIONIC_AVAILABILITY_GUARD' which is not defined in older termux releases (#26345) |
| 164 | +- Fix empty shared struct init (fix #16234) (#26354) |
| 165 | +- Add rv32 inline assembly support (#26362) |
| 166 | +- Fix fn arg for struct nested fields (fix #26346) (#26349) |
| 167 | +- Fix `+=` overloading for aliases, regression after 29e60da #23967 (fix #26416) (#26423) |
| 168 | +- Fix unused functions returning fixed arrays of custom structs (fix #26439) (#26440) |
| 169 | +- Fix or-block with fixed array constants with GCC 15.2 (fix #26442) (#26443) |
| 170 | +- Fix uninitialized interface bug (closes #17372) |
| 171 | +- Fix regression in `./v test vlib/toml` after 38ac4e6 (#26485) |
| 172 | +- Fix generation of struct initialisers for structs with option fields, inside ternaries (fix #26476) (#26493) |
| 173 | +- Fix the saving of g.skip_stmt_pos and g.stmt_path_pos when generating anonymous fns (fix #26498) (#26508) |
| 174 | +- Fix generic type handling bugs |
| 175 | +- Fix -autofree used for code doing "string ${f(@VEXE)} interpolation" (#26521) |
| 176 | +- Fix multi-return match in closure (fix #26558) (#26566) |
| 177 | +- Fix alias for interface and option types (fix #26551) (#26565) |
| 178 | +- Autofree fix generic math.min[T] used with time.Time (fix #26575) (#26577) |
| 179 | +- Fix extra dereference when indexing array of fns passed by pointer (fix #26556) (#26591) |
| 180 | +- Fix orm shared conn on sql expr (fixes #26479) (#26610) |
| 181 | +- Fix comptime match assign in generic fn, T.name string intp (fix #26053) (#26597) |
| 182 | +- Fix bit-field generation for option/result types in minified st… (#26670) |
| 183 | +- Use unsigned int for enum bit fields or unspecified size in @[minify] structs (#26678) |
| 184 | +- Fix auto-deref var in autofree string re-assignment (#26689) |
| 185 | + |
| 186 | +#### vfmt |
| 187 | +- Fix parser failing on duplicate methods in $if/$else blocks (fix #26271) (#26278) |
| 188 | + |
| 189 | +#### Tools |
| 190 | +- vwatch: fix process handle leak in kill_pgroup() (#26269) |
| 191 | +- vwatch: fix `-o` short flag conflict that broke hot reload (fix #26221) (#26277) |
| 192 | +- vcomplete: add git-fmt-hook command (#26396) |
| 193 | +- vrepl: fix handling of `//` inside string literals (fix #25603) (#26240) |
| 194 | +- v.help: add help for git-fmt-hook tool (#26394) |
| 195 | +- Add support for `v missdoc @vlib` |
| 196 | +- Add support for `v quest` |
| 197 | +- Add support for `v install --local gui` |
| 198 | +- Support .vcheckignore pattern files for `v check-md .` (#26623) |
| 199 | + |
| 200 | +#### Operating System support |
| 201 | +- msvc: split multi-token -I/-L values from pkg-config (#26637) |
| 202 | +- wasm: fix path separator in windows (#26264) |
| 203 | +- time: fix overflow in time.sys_mono_now() on windows (#26273) |
| 204 | +- sokol: fix errors for audio unsupported on OpenBSD (fix #26299) (#26305) |
| 205 | +- db.pg: improve support on OpenBSD (#26316) |
| 206 | +- os: fix get_raw_line for EOF on OpenBSD (fix #26361) (#26368) |
| 207 | +- Add support for vgit-fmt-hook on OpenBSD (fix #26344) (#26388) |
| 208 | +- builtin: use -Xlinker flags on macos, for compilers != tcc, to pass the rpath folder (fix for folders with spaces) |
| 209 | +- builtin: fix for tcc builds on paths with spaces on linux |
| 210 | +- os: implement readlink/1 on !windows (#26405) |
| 211 | +- builtin: fix compilation with tcc on OpenBSD using libgc (fix #26447) (#26448) |
| 212 | +- fasthttp: multi threading fix reads in the socket in linux (#26478) |
| 213 | +- time: prevent linux time functions from being included in non-linux platforms (#26596) |
| 214 | +- Fix hanging when printing to console in a `-subsystem windows` executable (#26572) |
| 215 | +- builder: fix Windows pkgconfig paths and MSVC flags (#26631) |
| 216 | +- net.vschannel: chunk large TLS payloads to fix 16KB EncryptMessage crash on Windows (#26681) |
| 217 | + |
| 218 | +#### Examples |
| 219 | +- examples,strings: add a new `strings.lorem` module; use it in the Markov chain text generator example (#26387) |
| 220 | +- Add examples/gg/pong/pong.v (#26528) |
| 221 | +- Improve pidigits.v using a much faster spigot algorithm |
| 222 | +- sokol: fix `v run examples/2048/` on macos (regressed after 5d6de17) (#26705) |
| 223 | + |
1 | 224 | ## V 0.5.0 |
2 | 225 | *31 Dec 2025* |
3 | 226 |
|
|
0 commit comments