Skip to main content

bnd_linux/
lib.rs

1//! Rust FFI bindings for POSIX and Linux system APIs.
2//!
3//! Generated by `bnd-linux-gen` — do not edit `src/libc/` manually.
4//!
5//! ## POSIX modules (`libc::posix::*`)
6//!
7//! - [`libc::posix::dirent`] — Directory entries (`opendir`, `readdir`, `closedir`, `DT_*` constants)
8//! - [`libc::posix::dl`] — Dynamic loading (`dlopen`, `dlclose`, `dlsym`, `dlerror`, `RTLD_*` constants)
9//! - [`libc::posix::errno`] — Error codes (`__errno_location`, `E*` constants)
10//! - [`libc::posix::fcntl`] — File control (`creat`, `lockf`, `O_*` constants)
11//! - [`libc::posix::inet`] — Internet addresses (`inet_pton`, `htons`, `sockaddr_in`, `IPPROTO_*`)
12//! - [`libc::posix::mmap`] — Memory mapping (`mmap`, `munmap`, `mprotect`, `MAP_*`/`PROT_*` constants)
13//! - [`libc::posix::netdb`] — Network database (`getaddrinfo`, `gethostbyname`, `addrinfo`, `AI_*`)
14//! - [`libc::posix::pthread`] — POSIX threads (`pthread_create`, `pthread_mutex_lock`, `PTHREAD_*` constants)
15//! - [`libc::posix::sched`] — Scheduling (`sched_yield`, `sched_setscheduler`, `SCHED_*` constants)
16//! - [`libc::posix::signal`] — Signal handling (`signal`, `sigaction`, `kill`, `raise`, `SIG*`/`SA_*`)
17//! - [`libc::posix::socket`] — Sockets (`socket`, `bind`, `listen`, `accept`, `sockaddr`, `AF_*`/`SOCK_*`)
18//! - [`libc::posix::stat`] — File status (`stat`, `chmod`, `mkdir`, `struct stat`)
19//! - [`libc::posix::stdio`] — Standard I/O (`fopen`, `fclose`, `fread`, `fwrite`)
20//! - [`libc::posix::time`] — Time functions (`clock_gettime`, `nanosleep`, `gmtime`, `CLOCK_*` constants)
21//! - [`libc::posix::types`] — Shared POSIX types (`uid_t`, `pid_t`, `mode_t`, `off_t`, `gid_t`, …)
22//! - [`libc::posix::unistd`] — POSIX standard (`read`, `write`, `close`, `fork`, …)
23//!
24//! ## Linux modules (`libc::linux::*`)
25//!
26//! - [`libc::linux::epoll`] — I/O event notification (`epoll_create1`, `epoll_ctl`, `epoll_wait`)
27//! - [`libc::linux::eventfd`] — Event file descriptors (`eventfd`, `eventfd_read`, `eventfd_write`)
28//! - [`libc::linux::inotify`] — File system events (`inotify_init1`, `inotify_add_watch`)
29//! - [`libc::linux::mount`] — Mount operations (`mount`, `umount`, `MS_*` flags)
30//! - [`libc::linux::sendfile`] — Zero-copy file transfer (`sendfile`)
31//! - [`libc::linux::signalfd`] — Signal file descriptors (`signalfd`, `struct signalfd_siginfo`)
32//! - [`libc::linux::timerfd`] — Timer file descriptors (`timerfd_create`, `timerfd_settime`)
33//! - [`libc::linux::types`] — Linux-specific types (`__be16`, `__be32`, `__le*`)
34//! - [`libc::linux::xattr`] — Extended attributes (`setxattr`, `getxattr`, `listxattr`)
35//!
36//! # Safety
37//!
38//! All function bindings are `unsafe` — they call directly into libc.
39
40pub mod libc;
41
42// Re-export bnd_macros as windows_link at the crate root so generated code
43// that references `windows_link::link!` resolves to our own macro crate.
44extern crate bnd_macros as windows_link;