diff options
Diffstat (limited to 'docs/code/helloworld/main.c')
-rw-r--r-- | docs/code/helloworld/main.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/code/helloworld/main.c b/docs/code/helloworld/main.c new file mode 100644 index 00000000..a31bf88a --- /dev/null +++ b/docs/code/helloworld/main.c @@ -0,0 +1,15 @@ +#include <stdio.h> +#include <stdlib.h> +#include <uv.h> + +int main() { + uv_loop_t *loop = malloc(sizeof(uv_loop_t)); + uv_loop_init(loop); + + printf("Now quitting.\n"); + uv_run(loop, UV_RUN_DEFAULT); + + uv_loop_close(loop); + free(loop); + return 0; +} |