andrewrk / zig-async-demo

Comparing concurrent code example programs between other languages and Zig
55 stars 9 forks source link

how to async read/print a file? #5

Open omac777 opened 4 years ago

omac777 commented 4 years ago

c async example read a file: https://github.com/shuveb/loti-examples/blob/master/cat_io_uring.c

versus c++ async read a file: https://github.com/CarterLi/liburing4cpp https://github.com/CarterLi/liburing4cpp/blob/async/demo/file_server.cpp

versus rust async read a file: https://github.com/async-rs/async-std/blob/master/examples/print-file.rs

Looking at the code for each of these, the rust async story is looking very strong yet very easy to use. How would you express the above read/print a file in zig? Thank you for listening?