wasi-libc/libc-bottom-half/headers/public
Joel Dice 684f155664
implement basic TCP/UDP client support (#477)
* implement basic TCP/UDP client support

This implements `socket`, `connect`, `recv`, `send`, etc. in terms of
`wasi-sockets` for the `wasm32-wasip2` target.

I've introduced a new public header file: `__wasi_snapshot.h`, which will define
a preprocessor symbol `__wasilibc_use_wasip2` if using the `wasm32-wasip2`
version of the header, in which case we provide features only available for that
target.

Co-authored-by: Dave Bakker <github@davebakker.io>
Signed-off-by: Joel Dice <joel.dice@fermyon.com>

* fix grammar in __wasi_snapshot.h comment

Co-authored-by: Dan Gohman <dev@sunfishcode.online>
Signed-off-by: Joel Dice <joel.dice@fermyon.com>

---------

Signed-off-by: Joel Dice <joel.dice@fermyon.com>
Co-authored-by: Dave Bakker <github@davebakker.io>
Co-authored-by: Dan Gohman <dev@sunfishcode.online>
2024-03-13 10:59:27 -07:00
..
netinet WASI libc prototype implementation. 2019-03-27 07:59:55 -07:00
sys WASI libc prototype implementation. 2019-03-27 07:59:55 -07:00
wasi Start renaming preview1 to p1 and preview2 to p2 (#478) 2024-03-04 15:57:34 -08:00
__errno_values.h Wasi snapshot preview1 (#140) 2019-11-21 20:06:00 -08:00
__errno.h add shared library support (#429) 2023-09-28 06:11:09 -07:00
__fd_set.h Implement FD_SET, FD_CLR, etc. 2019-04-23 15:01:23 -07:00
__function___isatty.h WASI libc prototype implementation. 2019-03-27 07:59:55 -07:00
__functions_malloc.h Merge the basics component into libc-bottom-half. (#199) 2020-06-01 16:44:05 -07:00
__functions_memcpy.h Merge the basics component into libc-bottom-half. (#199) 2020-06-01 16:44:05 -07:00
__header_dirent.h fix #ifdef __cplusplus guard in dirent.h (#479) 2024-03-08 06:08:11 -08:00
__header_fcntl.h AT_FDCWD support. 2021-02-05 06:41:53 -08:00
__header_inttypes.h Merge the basics component into libc-bottom-half. (#199) 2020-06-01 16:44:05 -07:00
__header_netinet_in.h Update to musl 1.1.24. 2020-02-26 10:23:05 -08:00
__header_poll.h WASI libc prototype implementation. 2019-03-27 07:59:55 -07:00
__header_stdlib.h Miscellaneous cleanups (#113) 2019-10-18 13:53:13 -07:00
__header_string.h Miscellaneous cleanups (#113) 2019-10-18 13:53:13 -07:00
__header_sys_ioctl.h WASI libc prototype implementation. 2019-03-27 07:59:55 -07:00
__header_sys_resource.h Declare getrusage. 2019-04-22 11:41:40 -07:00
__header_sys_socket.h implement basic TCP/UDP client support (#477) 2024-03-13 10:59:27 -07:00
__header_sys_stat.h Move the mode_t macros into their own header. 2019-05-10 12:37:49 -07:00
__header_time.h Delete several blocks of unused code. (#294) 2022-07-20 15:46:06 -07:00
__header_unistd.h Redefine the access bits to be compatible with other systems (#210) 2020-07-31 13:44:58 -07:00
__macro_FD_SETSIZE.h WASI libc prototype implementation. 2019-03-27 07:59:55 -07:00
__macro_PAGESIZE.h Add a getpagesize function. (#300) 2022-07-11 08:27:39 -07:00
__mode_t.h add stubs for statvfs, chmod, etc. (#463) 2024-01-11 12:16:59 -08:00
__seek.h Wasi snapshot preview1 (#140) 2019-11-21 20:06:00 -08:00
__struct_dirent.h WASI libc's dirent does have t_type, so define _DIRENT_HAVE_D_TYPE. 2019-08-29 10:22:03 -07:00
__struct_in6_addr.h Update to musl 1.1.24. 2020-02-26 10:23:05 -08:00
__struct_in_addr.h WASI libc prototype implementation. 2019-03-27 07:59:55 -07:00
__struct_iovec.h WASI libc prototype implementation. 2019-03-27 07:59:55 -07:00
__struct_msghdr.h WASI libc prototype implementation. 2019-03-27 07:59:55 -07:00
__struct_pollfd.h WASI libc prototype implementation. 2019-03-27 07:59:55 -07:00
__struct_rusage.h WASI libc prototype implementation. 2019-03-27 07:59:55 -07:00
__struct_sockaddr_in6.h Use __BIGGEST_ALIGNMENT__ instead of max_align_t (#375) 2023-01-09 08:33:58 -08:00
__struct_sockaddr_in.h Use __BIGGEST_ALIGNMENT__ instead of max_align_t (#375) 2023-01-09 08:33:58 -08:00
__struct_sockaddr_storage.h Use __BIGGEST_ALIGNMENT__ instead of max_align_t (#375) 2023-01-09 08:33:58 -08:00
__struct_sockaddr_un.h Use __BIGGEST_ALIGNMENT__ instead of max_align_t (#375) 2023-01-09 08:33:58 -08:00
__struct_sockaddr.h Use __BIGGEST_ALIGNMENT__ instead of max_align_t (#375) 2023-01-09 08:33:58 -08:00
__struct_stat.h Merge the basics component into libc-bottom-half. (#199) 2020-06-01 16:44:05 -07:00
__struct_timespec.h Merge the basics component into libc-bottom-half. (#199) 2020-06-01 16:44:05 -07:00
__struct_timeval.h WASI libc prototype implementation. 2019-03-27 07:59:55 -07:00
__struct_tm.h WASI libc prototype implementation. 2019-03-27 07:59:55 -07:00
__struct_tms.h WASI libc prototype implementation. 2019-03-27 07:59:55 -07:00
__typedef_blkcnt_t.h Merge the basics component into libc-bottom-half. (#199) 2020-06-01 16:44:05 -07:00
__typedef_blksize_t.h Merge the basics component into libc-bottom-half. (#199) 2020-06-01 16:44:05 -07:00
__typedef_clock_t.h Merge the basics component into libc-bottom-half. (#199) 2020-06-01 16:44:05 -07:00
__typedef_clockid_t.h WASI libc prototype implementation. 2019-03-27 07:59:55 -07:00
__typedef_dev_t.h Merge the basics component into libc-bottom-half. (#199) 2020-06-01 16:44:05 -07:00
__typedef_DIR.h WASI libc prototype implementation. 2019-03-27 07:59:55 -07:00
__typedef_fd_set.h WASI libc prototype implementation. 2019-03-27 07:59:55 -07:00
__typedef_gid_t.h Merge the basics component into libc-bottom-half. (#199) 2020-06-01 16:44:05 -07:00
__typedef_in_addr_t.h WASI libc prototype implementation. 2019-03-27 07:59:55 -07:00
__typedef_in_port_t.h WASI libc prototype implementation. 2019-03-27 07:59:55 -07:00
__typedef_ino_t.h Merge the basics component into libc-bottom-half. (#199) 2020-06-01 16:44:05 -07:00
__typedef_mode_t.h Merge the basics component into libc-bottom-half. (#199) 2020-06-01 16:44:05 -07:00
__typedef_nfds_t.h WASI libc prototype implementation. 2019-03-27 07:59:55 -07:00
__typedef_nlink_t.h Merge the basics component into libc-bottom-half. (#199) 2020-06-01 16:44:05 -07:00
__typedef_off_t.h Merge the basics component into libc-bottom-half. (#199) 2020-06-01 16:44:05 -07:00
__typedef_sa_family_t.h WASI libc prototype implementation. 2019-03-27 07:59:55 -07:00
__typedef_sigset_t.h WASI libc prototype implementation. 2019-03-27 07:59:55 -07:00
__typedef_socklen_t.h WASI libc prototype implementation. 2019-03-27 07:59:55 -07:00
__typedef_ssize_t.h Merge the basics component into libc-bottom-half. (#199) 2020-06-01 16:44:05 -07:00
__typedef_suseconds_t.h Merge the basics component into libc-bottom-half. (#199) 2020-06-01 16:44:05 -07:00
__typedef_time_t.h Merge the basics component into libc-bottom-half. (#199) 2020-06-01 16:44:05 -07:00
__typedef_uid_t.h Merge the basics component into libc-bottom-half. (#199) 2020-06-01 16:44:05 -07:00
__wasi_snapshot.h implement basic TCP/UDP client support (#477) 2024-03-13 10:59:27 -07:00
dirent.h WASI libc prototype implementation. 2019-03-27 07:59:55 -07:00
errno.h WASI libc prototype implementation. 2019-03-27 07:59:55 -07:00
fcntl.h WASI libc prototype implementation. 2019-03-27 07:59:55 -07:00
inttypes.h Merge the basics component into libc-bottom-half. (#199) 2020-06-01 16:44:05 -07:00
poll.h WASI libc prototype implementation. 2019-03-27 07:59:55 -07:00
stdlib.h Merge the basics component into libc-bottom-half. (#199) 2020-06-01 16:44:05 -07:00
string.h WASI libc prototype implementation. 2019-03-27 07:59:55 -07:00
time.h WASI libc prototype implementation. 2019-03-27 07:59:55 -07:00
unistd.h WASI libc prototype implementation. 2019-03-27 07:59:55 -07:00
wchar.h Merge the basics component into libc-bottom-half. (#199) 2020-06-01 16:44:05 -07:00