Name

SPVM::Resource::UV - libuv Resources

Description

SPVM::Resource::UV class in SPVM is a resource class for libuv library.

Usage

MyClass.config:

my $config = SPVM::Builder::Config->new_c99;

$config->use_resource('Resource::UV');

my $resource_uv = $config->get_resource('Resource::UV');
$config->add_define(@{$resource_uv->config->defines});
$config->add_lib(@{$resource_uv->config->libs});

$config;

MyClass.c:

#include <uv.h>

uv_loop_t* loop = uv_default_loop();

uv_run(loop, UV_RUN_DEFAULT);

uv_loop_close(loop);

Original Product

libuv

Original Product Version

libuv v1.52.1

Language

The C language

Language Standard

C99

Header Files

  • uv.h

  • uv/errno.h

  • uv/fos.h

  • uv/threadpool.h

  • uv/version.h

  • uv/unix.h

  • uv/win.h

Source Files

Common:

  • fs-poll.c

  • idna.c

  • inet.c

  • random.c

  • strscpy.c

  • strtok.c

  • thread-common.c

  • threadpool.c

  • timer.c

  • uv-common.c

  • uv-data-getter-setters.c

  • version.c

Unix:

  • unix/async.c

  • unix/core.c

  • unix/dl.c

  • unix/fs.c

  • unix/getaddrinfo.c

  • unix/getnameinfo.c

  • unix/loop-watcher.c

  • unix/loop.c

  • unix/pipe.c

  • unix/poll.c

  • unix/process.c

  • unix/random-devurandom.c

  • unix/signal.c

  • unix/stream.c

  • unix/tcp.c

  • unix/thread.c

  • unix/tty.c

  • unix/udp.c

Linux:

  • unix/linux.c

  • unix/procfs-exepath.c

  • unix/random-getrandom.c

  • unix/random-sysctl-linux.c

  • unix/proctitle.c

macOS (Darwin):

  • unix/proctitle.c

  • unix/darwin.c

  • unix/darwin-proctitle.c

  • unix/fsevents.c

  • unix/bsd-ifaddrs.c

  • unix/kqueue.c

  • unix/random-getentropy.c

Windows:

  • win/async.c

  • win/core.c

  • win/detect-wakeup.c

  • win/dl.c

  • win/error.c

  • win/fs.c

  • win/fs-event.c

  • win/getaddrinfo.c

  • win/getnameinfo.c

  • win/handle.c

  • win/loop-watcher.c

  • win/pipe.c

  • win/thread.c

  • win/poll.c

  • win/process.c

  • win/process-stdio.c

  • win/signal.c

  • win/snprintf.c

  • win/stream.c

  • win/tcp.c

  • win/tty.c

  • win/udp.c

  • win/util.c

  • win/winapi.c

  • win/winsock.c

Compiler Flags & Defines

Unix (Common):

  • -D_FILE_OFFSET_BITS=64

  • -D_LARGEFILE_SOURCE

Linux:

  • -D_GNU_SOURCE

  • -D_POSIX_C_SOURCE=200112

macOS (Darwin):

  • -D_DARWIN_UNLIMITED_SELECT=1

  • -D_DARWIN_USE_64_BIT_INODE=1

Windows:

  • -DWIN32_LEAN_AND_MEAN

  • -D_WIN32_WINNT=0x0A00

  • -D_CRT_DECLARE_NONSTDC_NAMES=0

Libraries

Linux:

  • dl

  • rt

Windows:

  • psapi

  • user32

  • advapi32

  • iphlpapi

  • userenv

  • ws2_32

  • dbghelp

  • ole32

  • shell32

How to Create Resource

Download

mkdir -p .tmp
git clone https://github.com/libuv/libuv .tmp/libuv
git -C .tmp/libuv checkout tags/v1.52.1 -b branch_v1.52.1
git -C .tmp/libuv branch

Extracting Header Files

The header files of libuv is copied into the include directory by the following command.

rsync -av --include='*.h' --exclude='*' .tmp/libuv/include/ lib/SPVM/Resource/UV.native/include/

Extracting Source Files

The source files of libuv are copied into the src directory by the following command.

rsync -av --exclude='*.h' .tmp/libuv/src/ lib/SPVM/Resource/UV.native/src/

Repository

SPVM::Resource::UV - Github

Author

Yuki Kimoto kimoto.yuki@gmail.com

Copyright & License

Copyright (c) 2026 Yuki Kimoto

MIT License