-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
WASM backend browser issue #26833
Copy link
Copy link
Open
Labels
BugThis tag is applied to issues which reports bugs.This tag is applied to issues which reports bugs.Status: ConfirmedThis bug has been confirmed to be valid by a contributor.This bug has been confirmed to be valid by a contributor.
Description
Describe the bug
Command
$ v -no-bounds-checking -enable-globals -b wasm -os browser test.wasm.v
or
$ v -no-bounds-checking -b wasm -os browser test.wasm.vgive me an error
wasm error: wasm.expr_stmt(): unhandled node: v.ast.EmptyStmt
no wasm binary output
$ cat test.wasm.v
pub main(){}Reproduction Steps
$ echo "pub main(){}" > test.wasm.v
$ v -no-bounds-checking -enable-globals -b wasm -os browser test.wasm.vExpected Behavior
Generate wasm binary for browser target.
Current Behavior
Generate an error
wasm error: wasm.expr_stmt(): unhandled node: v.ast.EmptyStmt
Gives no wasm binary
Possible Solution
none
Additional Information/Context
In V ver. 0.4.7 works fine
V version
V 0.5.1 28fb4e6
Environment details (OS name and version, etc.)
| V full version | V 0.5.1 28fb4e6 |
|---|---|
| OS | linux, Ubuntu 25.04 |
| Processor | 16 cpus, 64bit, little endian, AMD Ryzen 7 3700X 8-Core Processor |
| Memory | 0.36GB/15.06GB |
| V executable | /home/seven/vlang/v/v |
| V last modified time | 2026-04-05 14:09:25 |
| V home dir | OK, value: /home/seven/vlang/v |
| VMODULES | OK, value: /home/seven/.vmodules |
| VTMP | OK, value: /tmp/v_1000 |
| Current working dir | OK, value: /home/seven/programy/v_wasm/mem |
| Git version | git version 2.48.1 |
| V git status | weekly.2024.31-3979-g28fb4e6d |
| .git/config present | true |
| cc version | cc (Ubuntu 14.2.0-19ubuntu2) 14.2.0 |
| gcc version | gcc (Ubuntu 14.2.0-19ubuntu2) 14.2.0 |
| clang version | Ubuntu clang version 20.1.2 (0ubuntu1) |
| tcc version | tcc version 0.9.28rc 2025-02-13 HEAD@f8bd136d (x86_64 Linux) |
| tcc git status | thirdparty-linux-amd64 696c1d84 |
| emcc version | N/A |
| glibc version | ldd (Ubuntu GLIBC 2.41-6ubuntu1.2) 2.41 |
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugThis tag is applied to issues which reports bugs.This tag is applied to issues which reports bugs.Status: ConfirmedThis bug has been confirmed to be valid by a contributor.This bug has been confirmed to be valid by a contributor.