Open gslicer opened 5 years ago
Aleternatively:
fn syscall5(number int, arg1 int, arg2 string, arg3 u64, arg4 u64, arg5 voidptr) int
fn write(fd int, data string, nbytes u64) int {
return syscall5(1, fd, data, nbytes, 0, 0)
}
fn main() {
write(1, "Hello World!",12)
compile using -bare
option, resulting binary shall by statically linked and less than 2KiB in size
--> vlang.io (V on GitHub)
cat print('Hello World!') >> hello.v v --prod hello.v mv a.out hello_v