l-m.dev
$ cat > a.v << EOF
fn main() {
println("Hello WASI!")
}
EOF
$ v -b wasm a.v # implicit WASI target
$ wasmer a.wasm
Hello WASI!
V programs can be compiled to WASM via Emscripten, but a native WASM backend is being developed by l-m:
V now has a new wasm module with a pure V implementation of the wasm bytecode module format!
import wasm
!A stack based compiled systems programming language.
include <std.stas>
fn main {
'Hello world!\n' puts
}
$ hyperfine './stas stas.stas'
Benchmark 1: ./stas stas.stas
Time (mean ± σ): 79.5 ms ± 1.0 ms [User: 75.3 ms, System: 3.7 ms]
Range (min … max): 77.3 ms … 81.9 ms 37 runs
$ ./stas examples/hello_world.stas
$ wc -c ./a.out
356 ./a.out
$ ./stas examples/hello_world.stas -r
Hello world!