libc - Raw FFI bindings to platforms' system libraries

Overview

libc - Raw FFI bindings to platforms' system libraries

GHA Status Cirrus CI Status Latest Version Documentation License

libc provides all of the definitions necessary to easily interoperate with C code (or "C-like" code) on each of the platforms that Rust supports. This includes type definitions (e.g. c_int), constants (e.g. EINVAL) as well as function headers (e.g. malloc).

This crate exports all underlying platform types, functions, and constants under the crate root, so all items are accessible as libc::foo. The types and values of all the exported APIs match the platform that libc is compiled for.

More detailed information about the design of this library can be found in its associated RFC.

Usage

Add the following to your Cargo.toml:

[dependencies]
libc = "0.2"

Features

  • std: by default libc links to the standard library. Disable this feature to remove this dependency and be able to use libc in #![no_std] crates.

  • extra_traits: all structs implemented in libc are Copy and Clone. This feature derives Debug, Eq, Hash, and PartialEq.

  • const-extern-fn: Changes some extern fns into const extern fns. This feature requires a nightly rustc.

  • deprecated: use_std is deprecated, and is equivalent to std.

Rust version support

The minimum supported Rust toolchain version is Rust 1.13.0 . APIs requiring newer Rust features are only available on newer Rust toolchains:

Feature Version
union 1.19.0
const mem::size_of 1.24.0
repr(align) 1.25.0
extra_traits 1.25.0
core::ffi::c_void 1.30.0
repr(packed(N)) 1.33.0
cfg(target_vendor) 1.33.0

Platform support

Platform-specific documentation (master branch).

See ci/build.sh for the platforms on which libc is guaranteed to build for each Rust toolchain. The test-matrix at GitHub Actions and Cirrus CI show the platforms in which libc tests are run.

License

This project is licensed under either of

at your option.

Contributing

We welcome all people who want to contribute. Please see the contributing instructions for more information.

Contributions in any form (issues, pull requests, etc.) to this project must adhere to Rust's Code of Conduct.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in libc by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Comments
  • Fix mips64-musl ioctl consts to c_int

    Fix mips64-musl ioctl consts to c_int

    This arch was overlooked or unspecified in earlier PRs that fixed c_ulong to c_int for ioctl.h consts for musl, see PR #289, PR #301, or PR #1097 for such prior art, however these are still args to fn ioctl on mips64-musl, which is expecting c_ints.

    Some numbers acquired casts to reflect the fact the data is being used and (so should be written as) an unsized bitfield, even if the value is greater than i32::MAX.

    Currently rustc is not building on mips64-linux-musl because of this error.

    S-waiting-on-bors 
    opened by workingjubilee 73
  • Move uclibc under linux

    Move uclibc under linux

    This is a first cut at moving uclibc under linux, alongside musl and gnu.

    All tests pass on a vexpress a9 running in qemu. I am working on testing the other tier 3 uclibc targets: mips-unknown-linux-uclibc and mipsel-unknown-linux-uclibc. ~Not having access to these platforms, I am working on getting them running in qemu, but it may take a bit.~

    The style check doesn't pass. I would appreciate some direction here. Many of these constants are defined under 2-of-3 out of musl/glibc/uclibc, so I'm not sure whether I should transform:

    #[cfg(not(target_env = "uclibc"))]
    pub fn foo();
    

    into 2 separate declarations, one each in musl/mod.rs and gnu/mod.rs or use a cfg_if block for each one (which explodes 2 lines into 5).

    • [x] Help me choose which fix to use for the items defined in musl and gnu but not uclibc.

    It's my guess that exploding into the cfg_if block is better for long-term maintainability, but I'd really appreciate opinions from the maintainers.

    S-waiting-on-bors 
    opened by skrap 71
  • Add __errno_location on Redox, DragonFlyBSD, Haiku

    Add __errno_location on Redox, DragonFlyBSD, Haiku

    Currently libstd and the getrandom crate have to use external declarations in order to implement errno_location across all UNIX platforms. This change adds bindings for the remaining UNIX platforms, allowing everyone to just use normal libc bindings.

    This also removes the need for a seperate errno-dragonfly crate.

    Links to the relevant header files:

    • Redox: relibc's bits/errno.h uses __errno_location
    • Haiku: posix/errno.h uses _errnop
    • DragonFlyBSD: sys/errno.h uses __error just like FreeBSD (which makes sense)
      • Note that the __error function is inlined. I don't think this causes a problem.
    opened by josephlr 52
  • Add structs from linux/uinput.h + a couple of input-related constants

    Add structs from linux/uinput.h + a couple of input-related constants

    I could also add the full constant list from input-event-codes.h, but that's about 1000 lines of constants and it's not necessary to interact with the ioctls, just to interpret the values they return/accept. Also, I made the _CNT constants usize instead of u16 since they're intended to be buffer lengths, not actual input_event.code (or whatever else) values.

    S-waiting-on-bors 
    opened by coolreader18 48
  • Add res_init

    Add res_init

    The res_init function, while deprecated, is critical for making networked applications work correctly when switching between networks, or between being offline and online. By default, getaddrinfo and friends use a cached version of /etc/resolv.conf, which means that network changes are not picked up by applications after they first start up. This has bitten Firefox, Pidgin, MongoDB, and more in the past.

    The logic behind exposing only res_init is that it is the only res_* function that is frequently called directly by user applications. The other res_* functions provide low-level access to domain lookups, whereas res_init is useful even if the application itself is not concerned with doing lookups.

    Behind the scenes, getaddrinfo in glibc ultimately calls res_nsearch with &_res. res_init operates directly on this global reference, and is thus more useful to expose for most applications than the non-deprecated res_ninit function (which operators on an arbitrary res_state).

    As far as I can tell, res_init is available in FreeBSD, NetBSD, OpenBSD, Solaris, Linux, and macOS.

    opened by jonhoo 48
  • define TIOCGWINSZ as c_ulong under arm-uclibc.

    define TIOCGWINSZ as c_ulong under arm-uclibc.

    I'm trying to bring up a new target for rust, armv7-unknown-linux-uclibceabi (softfloat). https://github.com/rust-lang/rust/pull/92383 Looks like a lot of work has already been hashed out from the recent addition of armv7-unknown-linux-uclibceabihf. The only issue I'm currently seeing is when I encounter TIOCGWINSZ in a couple places. This is the error I see.

       Compiling termize v0.1.1 (/mmc/.cargo/registry/src/github.com-1285ae84e5963aae/termize-0.1.1)
    error[E0277]: the trait bound `u32: From<i32>` is not satisfied
      --> src/platform/unix.rs:12:43
       |
    12 |     let mut result = ioctl(STDOUT_FILENO, TIOCGWINSZ.into(), &mut window);
       |                      -----                ^^^^^^^^^^^^^^^^^ the trait `From<i32>` is not implemented for `u32`
       |                      |
       |                      required by a bound introduced by this call
       |
       = help: the following implementations were found:
                 <u32 as From<Ipv4Addr>>
                 <u32 as From<NonZeroU32>>
                 <u32 as From<bool>>
                 <u32 as From<char>>
               and 2 others
       = note: required because of the requirements on the impl of `Into<u32>` for `i32`
    
    error[E0277]: the trait bound `u32: From<i32>` is not satisfied
    

    I see the error in the termize crate, and also shell.rs in the cargo source.

    My current fix is to define TIOCGWINSZ as c_ulong under arm-uclibc.

    I don't want to break anything with the established armv7-unknown-linux-uclibceabihf target so perhaps @skrap could chime in and take a look. Maybe a better solutions exists.

    S-waiting-on-bors 
    opened by lancethepants 46
  • Add regression test infrastructure

    Add regression test infrastructure

    Please the commit messages for details.

    I still need to add lists for the following targets, but I got the major ones I think.

    TODO:

    • aarch64-unknown-hermit
    • x86_64-unknown-hermit
    • x86_64-pc-solaris
    • x86_64-sun-solaris
    • sparcv9-sun-solaris
    • x86_64-fortanix-unknown-sgx
    • x86_64-unknown-illumos
    • asmjs-unknown-emscripten
    • wasm32-unknown-emscripten
    • wasm32-unknown-unknown
    • wasm32-wasi
    • Check symbols added after commit ed45c2649b848bc2df48ba10d68194d45da03b75.

    TODO: add a bit to the contributing guide about adding to these lists.

    Closes #2104.

    S-waiting-on-bors 
    opened by Thomasdezeeuw 46
  • Define basic Linux SocketCAN constants and types

    Define basic Linux SocketCAN constants and types

    Add definitions from linux/can.h, which is a "base" header for remainder of SocketCAN functionality.

    CAN bus (ISO-11898) is a communication standard used in automotive, automation and industrial solutions. Linux provides a socket-like interface to access raw CAN and protocols based on CAN, such as ISO-TP(ISO-15765) or SAE-J1939.

    S-waiting-on-bors 
    opened by djarek 46
  • RFC 2235 - Implement PartialEq,Eq,Hash,Debug for all types

    RFC 2235 - Implement PartialEq,Eq,Hash,Debug for all types

    First pass at implementing RFC2235. I just started with PartialEq/Eq and tested locally on my x64 Linux system. Definitely going to run into other types for other platforms that need this treatment, but thought I'd start small.

    Open question is whether this should also rely on the align feature, which should improve which types can be auto-derived versus manually implemented (as it removed a lot of odd-sized padding arrays). My first pass here doesn't do that, but I might test it out to see if it does simplify quite a few structs. I think it might also be nice to have as it makes it easier for contributors to add new structs.

    Part of rust-lang/rust#57715

    opened by Susurrus 43
  • Add initial support for sparc-unknown-linux-gnu

    Add initial support for sparc-unknown-linux-gnu

    While the Rust compiler already supports the sparc-unknown-linux-gnu target, the libc crate is missing support for it. Let's add it so that Rust can built for this target as well.

    opened by glaubitz 40
  • Unnecessary `mut`in the epoll_ctl API

    Unnecessary `mut`in the epoll_ctl API

    In the epoll_ctl API, I's required that the last parameter struct epoll_event *event as *mut.

    I have checked the linux implementation for epoll_ctl and this parameter's value is never assigned to, for example: event = foo;

    Is there a reason why it's required to pass this parameter as *mut and not *const ?

    C-bug 
    opened by mohamed-said 0
  • uclibc/mips: add O_NOATIME & O_PATH constant

    uclibc/mips: add O_NOATIME & O_PATH constant

    Signed-off-by: Xiaobo Liu [email protected]

    This adds the O_NOATIME & O_PATH constant on Linux and uclibc. It is defined as part of the uclibc in fcntl.h:

    https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/tree/libc/sysdeps/linux/mips/bits/fcntl.h?id=9efce41dd3bb5d721a5b771931126f32a85e1958#n56

    https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/tree/libc/sysdeps/linux/mips/bits/fcntl.h?id=9efce41dd3bb5d721a5b771931126f32a85e1958#n57

    S-waiting-on-review 
    opened by cppcoffee 1
  • Set correct `FD_SETSIZE` for `espidf`

    Set correct `FD_SETSIZE` for `espidf`

    Source: https://github.com/espressif/newlib-esp32/blob/esp_based_on_4_1_0/newlib/libc/include/sys/select.h#L31 @ivmarkov @igrr @MabezDev Please correct me if I'm wrong

    S-waiting-on-review 
    opened by zRedShift 1
  • linux-like: add OPEN_TREE_CLONE and OPEN_TREE_CLOEXEC

    linux-like: add OPEN_TREE_CLONE and OPEN_TREE_CLOEXEC

    This adds the OPEN_TREE_CLONE and OPEN_TREE_CLOEXEC constants on Linux and Android. Those are used by the open_tree() syscall and defined in mount.h:

    • https://github.com/torvalds/linux/blob/v6.1/include/uapi/linux/mount.h#L61-L65
    S-waiting-on-review 
    opened by lucab 1
Releases(0.2.139)
  • 0.2.139(Dec 22, 2022)

    What's Changed

    • Update FreeBSD 12 CI environment to 12.4 by @asomers in https://github.com/rust-lang/libc/pull/3028
    • Try readding all inotify flags by @carbotaniuman in https://github.com/rust-lang/libc/pull/3030
    • linux: Add AT_SYSINFO_EHDR constant by @Phantomical in https://github.com/rust-lang/libc/pull/3027
    • Add missing string-to-number functions from ISO C by @LegionMammal978 in https://github.com/rust-lang/libc/pull/3036
    • Add support for QNX/Neutrino 7.1 by @gh-tr in https://github.com/rust-lang/libc/pull/3038
    • Add misc constants and functions for android by @fkm3 in https://github.com/rust-lang/libc/pull/2758
    • adding KERNEL_VERSION macro for linux. by @devnexen in https://github.com/rust-lang/libc/pull/3041
    • Prepare 0.2.139 release by @flba-eb in https://github.com/rust-lang/libc/pull/3042

    New Contributors

    • @Phantomical made their first contribution in https://github.com/rust-lang/libc/pull/3027
    • @LegionMammal978 made their first contribution in https://github.com/rust-lang/libc/pull/3036
    • @gh-tr made their first contribution in https://github.com/rust-lang/libc/pull/3038
    • @fkm3 made their first contribution in https://github.com/rust-lang/libc/pull/2758

    Full Changelog: https://github.com/rust-lang/libc/compare/0.2.138...0.2.139

    Source code(tar.gz)
    Source code(zip)
  • 0.2.138(Dec 3, 2022)

    What's Changed

    • Fix typo: readfs -> readfds by @giraffate in https://github.com/rust-lang/libc/pull/2981
    • linux: Add POSIX_SPAWN_SETSID flag by @HarveyHunt in https://github.com/rust-lang/libc/pull/2983
    • Enforce order of any s_*! macro calls by @flba-eb in https://github.com/rust-lang/libc/pull/2985
    • Add FICLONE ioctl for linux aarch64 by @dtolnay in https://github.com/rust-lang/libc/pull/2986
    • Revive x86_64-linux-android CI with an old nightly by @JohnTitor in https://github.com/rust-lang/libc/pull/2990
    • fix wrong definitions of getpwent_r and getgrent_r on solarish os by @SteveLauC in https://github.com/rust-lang/libc/pull/2914
    • add extended attributes constants on NetBSD by @SteveLauC in https://github.com/rust-lang/libc/pull/2988
    • Use an old emulator to fix Android CI by @JohnTitor in https://github.com/rust-lang/libc/pull/2989
    • Add ucontext and clone_args for loongarch64 by @zhaixiaojuan in https://github.com/rust-lang/libc/pull/2993
    • Add Android uinput bindings by @spencercw in https://github.com/rust-lang/libc/pull/2984
    • add extattr_list_xxx() on NetBSD by @SteveLauC in https://github.com/rust-lang/libc/pull/2991
    • freebsd procctl flags update by @devnexen in https://github.com/rust-lang/libc/pull/2992
    • Report the actual error when failing to get the rustc version by @bjorn3 in https://github.com/rust-lang/libc/pull/3000
    • ci: Read test output from stderr by @JohnTitor in https://github.com/rust-lang/libc/pull/3005
    • freebsd subset of memstat api addition by @devnexen in https://github.com/rust-lang/libc/pull/2998
    • Add rand48 functions by @carbotaniuman in https://github.com/rust-lang/libc/pull/2995
    • Add sys/ucontext.h signatures for linux aarch64 glibc by @dtolnay in https://github.com/rust-lang/libc/pull/3001
    • Add pull request template by @JohnTitor in https://github.com/rust-lang/libc/pull/3006
    • Add kexec_file_load system call for arm64 linux by @dtolnay in https://github.com/rust-lang/libc/pull/3009
    • Migrate from highfive to triagebot by @ehuss in https://github.com/rust-lang/libc/pull/3018
    • mips32: fix missing __s64 type definition by @cppcoffee in https://github.com/rust-lang/libc/pull/3016
    • Revert "Auto merge of #3018 - ehuss:highfive-triagebot, r=JohnTitor" by @JohnTitor in https://github.com/rust-lang/libc/pull/3019
    • Fix the loongarch64 kernel ABI by @xen0n in https://github.com/rust-lang/libc/pull/3007
    • adding SYS_pidfd_send_signal/SYS_pidfd_getfd constants to linux uclib… by @devnexen in https://github.com/rust-lang/libc/pull/3012
    • handle c circular dependence (linux gnu) by @BelovDV in https://github.com/rust-lang/libc/pull/3013
    • Migrate from highfive to triagebot by @ehuss in https://github.com/rust-lang/libc/pull/3020
    • Rearrange sockaddr_storage padding/alignment fields on Linux and Fuchsia by @stevenengler in https://github.com/rust-lang/libc/pull/3010
    • linux musl adding PIDFD_NONBLOCK constant. by @devnexen in https://github.com/rust-lang/libc/pull/3003
    • Add more capsicum functions for FreeBSD by @asomers in https://github.com/rust-lang/libc/pull/3022
    • Enable copy_file_range on FreeBSD by @asomers in https://github.com/rust-lang/libc/pull/3023
    • adding getopt_long for unixes. by @devnexen in https://github.com/rust-lang/libc/pull/3021
    • redox: long is 32-bits on 32-bit systems by @jackpot51 in https://github.com/rust-lang/libc/pull/3024
    • bump to 0.2.138 by @SteveLauC in https://github.com/rust-lang/libc/pull/2994

    New Contributors

    • @giraffate made their first contribution in https://github.com/rust-lang/libc/pull/2981
    • @HarveyHunt made their first contribution in https://github.com/rust-lang/libc/pull/2983
    • @flba-eb made their first contribution in https://github.com/rust-lang/libc/pull/2985
    • @spencercw made their first contribution in https://github.com/rust-lang/libc/pull/2984
    • @bjorn3 made their first contribution in https://github.com/rust-lang/libc/pull/3000
    • @ehuss made their first contribution in https://github.com/rust-lang/libc/pull/3018
    • @cppcoffee made their first contribution in https://github.com/rust-lang/libc/pull/3016
    • @BelovDV made their first contribution in https://github.com/rust-lang/libc/pull/3013
    • @stevenengler made their first contribution in https://github.com/rust-lang/libc/pull/3010

    Full Changelog: https://github.com/rust-lang/libc/compare/0.2.137...0.2.138

    Source code(tar.gz)
    Source code(zip)
  • 0.2.137(Oct 25, 2022)

    What's Changed

    • Ignore res_init test on macOS by @JohnTitor in https://github.com/rust-lang/libc/pull/2980
    • follow-up on #2963, changing MSG* constant types for musl/emscripten. by @devnexen in https://github.com/rust-lang/libc/pull/2978
    • add dirname and basename by @SteveLauC in https://github.com/rust-lang/libc/pull/2974
    • Add MADV constants for Redox by @jackpot51 in https://github.com/rust-lang/libc/pull/2979
    • Prepare 0.2.137 release by @JohnTitor in https://github.com/rust-lang/libc/pull/2982

    Full Changelog: https://github.com/rust-lang/libc/compare/0.2.136...0.2.137

    Source code(tar.gz)
    Source code(zip)
  • 0.2.136(Oct 24, 2022)

    What's Changed

    • Ignore arm-linux-androideabi on bors by @JohnTitor in https://github.com/rust-lang/libc/pull/2959
    • add some time functions on glibc and musl by @SteveLauC in https://github.com/rust-lang/libc/pull/2957
    • Add support for tvOS by @thomcc in https://github.com/rust-lang/libc/pull/2958
    • implement ifreq for linux by @folkertdev in https://github.com/rust-lang/libc/pull/2960
    • adds putenv call to win32. by @devnexen in https://github.com/rust-lang/libc/pull/2964
    • solarish: Fix libsendfile symbol dependency by @pfmooney in https://github.com/rust-lang/libc/pull/2970
    • openbsd: add more locale constants for use with newlocale() by @semarie in https://github.com/rust-lang/libc/pull/2965
    • linux add missing SIOC* constants. by @devnexen in https://github.com/rust-lang/libc/pull/2967
    • Redox updates by @jackpot51 in https://github.com/rust-lang/libc/pull/2966
    • add missing clockid_t on macOS by @name1e5s in https://github.com/rust-lang/libc/pull/2968
    • linux fixes recvmmsg flags type for musl/emscripten. by @devnexen in https://github.com/rust-lang/libc/pull/2963
    • Add more MNT_ flags on {Dragonfly,Net,Open}BSD by @asomers in https://github.com/rust-lang/libc/pull/2973
    • illumos: Remove obsolete (and private) a.out define by @pfmooney in https://github.com/rust-lang/libc/pull/2969
    • Prepare 0.2.136 release by @JohnTitor in https://github.com/rust-lang/libc/pull/2975

    Full Changelog: https://github.com/rust-lang/libc/compare/0.2.135...0.2.136

    Source code(tar.gz)
    Source code(zip)
  • 0.2.135(Oct 10, 2022)

    What's Changed

    • Deploy GitHub Pages via GitHub Actions by @JohnTitor in https://github.com/rust-lang/libc/pull/2933
    • mmap/madvise specific solaris additional flags. by @devnexen in https://github.com/rust-lang/libc/pull/2922
    • linux add ptrace_rseq_configuration by @devnexen in https://github.com/rust-lang/libc/pull/2923
    • Update FreeBSD 13 CI image to 13.1 by @asomers in https://github.com/rust-lang/libc/pull/2936
    • add major/minor/makedev on apple OSes by @SteveLauC in https://github.com/rust-lang/libc/pull/2937
    • gha: Downgrade macOS image to 11 as workaround by @JohnTitor in https://github.com/rust-lang/libc/pull/2939
    • GitHub Workflows security hardening by @sashashura in https://github.com/rust-lang/libc/pull/2938
    • Finish darwin os/lock.h bindings by @thomcc in https://github.com/rust-lang/libc/pull/2940
    • solarish amd64 regset constants by @devnexen in https://github.com/rust-lang/libc/pull/2930
    • add fgetpwent_r and fgetgrent_r on GNU/Linux by @SteveLauC in https://github.com/rust-lang/libc/pull/2943
    • Don't link against iconv on apple targets when used by std by @thomcc in https://github.com/rust-lang/libc/pull/2944
    • os_log/signpost for apple api subset by @devnexen in https://github.com/rust-lang/libc/pull/2946
    • add euidaccess and eaccess on gnu/musl linux by @SteveLauC in https://github.com/rust-lang/libc/pull/2947
    • add xfs super magic to android targets by @MrCroxx in https://github.com/rust-lang/libc/pull/2949
    • add missing STATX_ATTR_* constants on gnu/linux by @SteveLauC in https://github.com/rust-lang/libc/pull/2941
    • add faccessat on illumos/solaris and euidaccess on solaris by @SteveLauC in https://github.com/rust-lang/libc/pull/2953
    • add eaccess on freebsd and dragonfly by @SteveLauC in https://github.com/rust-lang/libc/pull/2952
    • Ignore i686-linux-android on bors by @JohnTitor in https://github.com/rust-lang/libc/pull/2954
    • Bump to 0.2.135 by @MrCroxx in https://github.com/rust-lang/libc/pull/2951

    New Contributors

    • @sashashura made their first contribution in https://github.com/rust-lang/libc/pull/2938
    • @MrCroxx made their first contribution in https://github.com/rust-lang/libc/pull/2949

    Full Changelog: https://github.com/rust-lang/libc/compare/0.2.134...0.2.135

    Source code(tar.gz)
    Source code(zip)
  • 0.2.134(Sep 29, 2022)

    What's Changed

    • refactor: use grep -E instead of egrep by @kxxt in https://github.com/rust-lang/libc/pull/2916
    • Exposed malloc_size on Mac by @naricc in https://github.com/rust-lang/libc/pull/2921
    • fs: add NSFS_MAGIC constant by @tammela in https://github.com/rust-lang/libc/pull/2928
    • CPU_SETSIZE constant to dragonflybsd. by @devnexen in https://github.com/rust-lang/libc/pull/2925
    • Update Docker image to Ubuntu 22.04 by @JohnTitor in https://github.com/rust-lang/libc/pull/2915
    • Use ::Option and not Option for pthread_jit_write_callback_t by @thomcc in https://github.com/rust-lang/libc/pull/2931
    • Prepare 0.2.134 release by @JohnTitor in https://github.com/rust-lang/libc/pull/2932

    New Contributors

    • @kxxt made their first contribution in https://github.com/rust-lang/libc/pull/2916
    • @naricc made their first contribution in https://github.com/rust-lang/libc/pull/2921
    • @tammela made their first contribution in https://github.com/rust-lang/libc/pull/2928

    Full Changelog: https://github.com/rust-lang/libc/compare/0.2.133...0.2.134

    Source code(tar.gz)
    Source code(zip)
  • 0.2.133(Sep 19, 2022)

    What's Changed

    • freebsd adding ptsname_r by @devnexen in https://github.com/rust-lang/libc/pull/2878
    • openbsd: ignore ci error about unexistent KERN_NSELCOLL constant by @semarie in https://github.com/rust-lang/libc/pull/2879
    • Add ENOTSUP constant for riscv32/musl by @kraj in https://github.com/rust-lang/libc/pull/2884
    • freebsd cpuset affinity flags. by @devnexen in https://github.com/rust-lang/libc/pull/2885
    • IEEE EUI-64 callss for freebsd/dragonflybsd. by @devnexen in https://github.com/rust-lang/libc/pull/2882
    • apple SEEK_{DATA,HOLE} O_{EVTONLY,NOFOLLOW_ANY} by @youknowone in https://github.com/rust-lang/libc/pull/2886
    • Add confstr and guaranteed _CS_* constants on apple by @thomcc in https://github.com/rust-lang/libc/pull/2883
    • add freebsd's cpusetid_t api by @devnexen in https://github.com/rust-lang/libc/pull/2887
    • Add CPU_SETSIZE const for FreeBSD by @lwhsu in https://github.com/rust-lang/libc/pull/2888
    • linux: add missing netfilter definitions by @phi-gamma in https://github.com/rust-lang/libc/pull/2876
    • Upgrade Ubuntu image on GHA to 22.04 by @JohnTitor in https://github.com/rust-lang/libc/pull/2890
    • add missing SOF_TIMESTAMPING flags by @folkertdev in https://github.com/rust-lang/libc/pull/2881
    • freebsd add shm_largepage_conf data and its ioctl request. by @devnexen in https://github.com/rust-lang/libc/pull/2892
    • Add musl's lib folder to library search path by @wesleywiser in https://github.com/rust-lang/libc/pull/2893
    • linux: add rtnetlink mcast group definitions by @phi-gamma in https://github.com/rust-lang/libc/pull/2889
    • apple add pthread_jit_write_callback_t api related. by @devnexen in https://github.com/rust-lang/libc/pull/2896
    • Fix the tests on the latest FreeBSD 14.0-CURRENT by @asomers in https://github.com/rust-lang/libc/pull/2898
    • Added missing constants from elf.h by @paandahl in https://github.com/rust-lang/libc/pull/2897
    • apple: Add the attrlist set of functions by @beetrees in https://github.com/rust-lang/libc/pull/2902
    • Add makedev for the BSDs by @asomers in https://github.com/rust-lang/libc/pull/2891
    • solarish SHM* flags by @devnexen in https://github.com/rust-lang/libc/pull/2905
    • fcntl F_DUPFD_CLOEXEC has different values on Solaris and Illumos by @gco in https://github.com/rust-lang/libc/pull/2900
    • Solaris TCP_KEEPINTVL and TCP_KEEPCNT have wrong values by @gco in https://github.com/rust-lang/libc/pull/2901
    • Add new Linux system call constants by @cd-work in https://github.com/rust-lang/libc/pull/2904
    • openbsd: add getmntinfo(3) and getfsstat(2) support by @semarie in https://github.com/rust-lang/libc/pull/2907
    • Update s390x installer to 20220914 by @JohnTitor in https://github.com/rust-lang/libc/pull/2912
    • expose setgrent/getgrent/endgrent on fuchsia by @SteveLauC in https://github.com/rust-lang/libc/pull/2910
    • netbsd mcontext x86_64 constants. by @devnexen in https://github.com/rust-lang/libc/pull/2911
    • Compatibility with ESP-IDF V5 by @ivmarkov in https://github.com/rust-lang/libc/pull/2913
    • linux add FICLONE* ioctl. by @devnexen in https://github.com/rust-lang/libc/pull/2899
    • Bump version to 0.2.133 by @beetrees in https://github.com/rust-lang/libc/pull/2906

    New Contributors

    • @thomcc made their first contribution in https://github.com/rust-lang/libc/pull/2883
    • @lwhsu made their first contribution in https://github.com/rust-lang/libc/pull/2888
    • @folkertdev made their first contribution in https://github.com/rust-lang/libc/pull/2881
    • @wesleywiser made their first contribution in https://github.com/rust-lang/libc/pull/2893
    • @paandahl made their first contribution in https://github.com/rust-lang/libc/pull/2897
    • @beetrees made their first contribution in https://github.com/rust-lang/libc/pull/2902
    • @gco made their first contribution in https://github.com/rust-lang/libc/pull/2900
    • @cd-work made their first contribution in https://github.com/rust-lang/libc/pull/2904
    • @SteveLauC made their first contribution in https://github.com/rust-lang/libc/pull/2910

    Full Changelog: https://github.com/rust-lang/libc/compare/0.2.132...0.2.133

    Source code(tar.gz)
    Source code(zip)
  • 0.2.132(Aug 16, 2022)

    What's Changed

    • Add FUTEX_LOCK_PI2 on Linux by @rtzoeller in https://github.com/rust-lang/libc/pull/2874
    • Add pthread_sigqueue. by @pirocks in https://github.com/rust-lang/libc/pull/2873
    • Fix incorrect constant for O_LARGEFILE on mips64-linux-musl by @jam1garner in https://github.com/rust-lang/libc/pull/2875
    • Bump version to 0.2.132 by @pirocks in https://github.com/rust-lang/libc/pull/2877

    New Contributors

    • @pirocks made their first contribution in https://github.com/rust-lang/libc/pull/2873
    • @jam1garner made their first contribution in https://github.com/rust-lang/libc/pull/2875

    Full Changelog: https://github.com/rust-lang/libc/compare/0.2.131...0.2.132

    Source code(tar.gz)
    Source code(zip)
  • 0.2.131(Aug 12, 2022)

    What's Changed

    • Add gnu_get_[version|release] for glibc by @LegNeato in https://github.com/rust-lang/libc/pull/2862
    • Bump to 0.2.131 to work around Cargo bug by @Amanieu in https://github.com/rust-lang/libc/pull/2871

    Full Changelog: https://github.com/rust-lang/libc/compare/0.2.130...0.2.131

    Source code(tar.gz)
    Source code(zip)
  • 0.2.130(Aug 11, 2022)

    What's Changed

    • Bump to 0.2.130 by @teamplayer3 in https://github.com/rust-lang/libc/pull/2868

    New Contributors

    • @teamplayer3 made their first contribution in https://github.com/rust-lang/libc/pull/2868

    Full Changelog: https://github.com/rust-lang/libc/compare/0.2.129...0.2.130

    Source code(tar.gz)
    Source code(zip)
  • 0.2.129(Aug 9, 2022)

    What's Changed

    • Bump up to v0.2.129 by @JohnTitor in https://github.com/rust-lang/libc/pull/2867

    Full Changelog: https://github.com/rust-lang/libc/compare/0.2.128...0.2.129

    Source code(tar.gz)
    Source code(zip)
  • 0.2.128(Aug 9, 2022)

    This version has been yanked on crates.io, see https://github.com/rust-lang/libc/issues/2866 for the details.

    What's Changed

    • libc 0.2.127 by @joshtriplett in https://github.com/rust-lang/libc/pull/2859
    • feat: Add f_flags_ext member to Apple's statfs structure by @poliorcetics in https://github.com/rust-lang/libc/pull/2858
    • Bump libc-test version to match libc by @joshtriplett in https://github.com/rust-lang/libc/pull/2863
    • add BUS_ si_code constants by @i509VCB in https://github.com/rust-lang/libc/pull/2855
    • Fix for https://github.com/rust-lang/libc/issues/2860 by @Tastaturtaste in https://github.com/rust-lang/libc/pull/2861
    • Add definitions in libc headers in Android for riscv64 by @MaoHan001 in https://github.com/rust-lang/libc/pull/2857
    • add crt-static for android by @Bryanskiy in https://github.com/rust-lang/libc/pull/2848
    • Socket constants necessary for ESP-IDF support in socket2 by @ivmarkov in https://github.com/rust-lang/libc/pull/2864
    • libc v0.2.128 by @Amanieu in https://github.com/rust-lang/libc/pull/2865

    New Contributors

    • @poliorcetics made their first contribution in https://github.com/rust-lang/libc/pull/2858
    • @Tastaturtaste made their first contribution in https://github.com/rust-lang/libc/pull/2861
    • @MaoHan001 made their first contribution in https://github.com/rust-lang/libc/pull/2857
    • @Bryanskiy made their first contribution in https://github.com/rust-lang/libc/pull/2848

    Full Changelog: https://github.com/rust-lang/libc/compare/0.2.127...0.2.128

    Source code(tar.gz)
    Source code(zip)
  • 0.2.127(Aug 9, 2022)

    What's Changed

    • Clean up lints around unused macros by @Amanieu in https://github.com/rust-lang/libc/pull/2797
    • dragonflybsd adding subset of kvm api by @devnexen in https://github.com/rust-lang/libc/pull/2796
    • Macos rawsock by @qrnch-jan in https://github.com/rust-lang/libc/pull/2791
    • Add NetBSD ki_sigset_t, kinfo_proc2, and kinfo_lwp structs by @Freaky in https://github.com/rust-lang/libc/pull/2792
    • dragonflybsd adding vmspace data. by @devnexen in https://github.com/rust-lang/libc/pull/2798
    • Add swd field to impls for user_fpregs_struct by @Minoru in https://github.com/rust-lang/libc/pull/2802
    • apple adding IPV6_BOUND_IF socket constant. by @devnexen in https://github.com/rust-lang/libc/pull/2801
    • unix: setreuid/setregid by @edigaryev in https://github.com/rust-lang/libc/pull/2803
    • linux glibc add user_fpsimd_struct struct by @devnexen in https://github.com/rust-lang/libc/pull/2607
    • Musl s390x: add ENOTSUP alias for EOPNOTSUPP by @AlekseiNikiforovIBM in https://github.com/rust-lang/libc/pull/2809
    • solarish systems SOMAXCONN constant by @devnexen in https://github.com/rust-lang/libc/pull/2807
    • Remove workarounds for old FreeBSDs on libc-test by @JohnTitor in https://github.com/rust-lang/libc/pull/2804
    • Order setre{g,u}id alphabetically by @JohnTitor in https://github.com/rust-lang/libc/pull/2805
    • Upgrade Windows runners to windows-2022 by @JohnTitor in https://github.com/rust-lang/libc/pull/2806
    • linux SOMAXCONN rework proposal. by @devnexen in https://github.com/rust-lang/libc/pull/2808
    • haiku SOMAXCONN constant by @devnexen in https://github.com/rust-lang/libc/pull/2810
    • linux 64 bits gnu/musl add clone_args for clone3 syscall. by @devnexen in https://github.com/rust-lang/libc/pull/2811
    • adds android sys/prctl.h by @lattice0 in https://github.com/rust-lang/libc/pull/2814
    • ucontext usage update on macos 64 bits. by @devnexen in https://github.com/rust-lang/libc/pull/2817
    • Update semverver to 0.1.50 by @JohnTitor in https://github.com/rust-lang/libc/pull/2821
    • Enable libc_const_extern_fn implicitly from Rust 1.62 by @JohnTitor in https://github.com/rust-lang/libc/pull/2820
    • Add doc aliases on __error() function by @GuillaumeGomez in https://github.com/rust-lang/libc/pull/2822
    • haiku sigaltstack api completion. by @devnexen in https://github.com/rust-lang/libc/pull/2825
    • Don't check typedefs in impls in style checker by @JohnTitor in https://github.com/rust-lang/libc/pull/2824
    • apple add task_create/task_terminate by @devnexen in https://github.com/rust-lang/libc/pull/2826
    • task_threads addition for macOs by @devnexen in https://github.com/rust-lang/libc/pull/2827
    • Drop support for Rumprun by @JohnTitor in https://github.com/rust-lang/libc/pull/2828
    • memfd_create additional flags for FreeBSD. by @devnexen in https://github.com/rust-lang/libc/pull/2829
    • Add IPv6 CMSG options to Fuchsia by @brunowonka in https://github.com/rust-lang/libc/pull/2823
    • Add rtnetlink.h, if_link.h, if_addr.h to Android by @tiann in https://github.com/rust-lang/libc/pull/2830
    • Upgrade macOS image to 12 by @JohnTitor in https://github.com/rust-lang/libc/pull/2831
    • task_set_info addition, on macOs only. by @devnexen in https://github.com/rust-lang/libc/pull/2834
    • linux/glibc tagged ptr supports for arm64 control addition. by @devnexen in https://github.com/rust-lang/libc/pull/2833
    • linux arm64 pointer, prctl auth control follow-up. by @devnexen in https://github.com/rust-lang/libc/pull/2837
    • Haiku: add the posix_spawn functions and constants by @nielx in https://github.com/rust-lang/libc/pull/2839
    • prctl process timing control options for android. by @devnexen in https://github.com/rust-lang/libc/pull/2840
    • Fix FreeBSD CPU_ macros by @rtzoeller in https://github.com/rust-lang/libc/pull/2842
    • style: Format errors so that editors can jump to file/line by @joshtriplett in https://github.com/rust-lang/libc/pull/2846
    • Fix the type of file flags on OpenBSD by @asomers in https://github.com/rust-lang/libc/pull/2841
    • Add ETH_P_IP to Fuchsia public constants by @obrown06 in https://github.com/rust-lang/libc/pull/2847
    • linux prctl add speculation control flags by @devnexen in https://github.com/rust-lang/libc/pull/2838
    • Few socket updates related for Linux. by @devnexen in https://github.com/rust-lang/libc/pull/2849
    • README.md: Clarify (lack of) MSRV policy by @joshtriplett in https://github.com/rust-lang/libc/pull/2852
    • memmem and task_set_info are available on iOS by @youknowone in https://github.com/rust-lang/libc/pull/2853
    • linux: add TFD_TIMER_CANCEL_ON_SET constant by @pabigot in https://github.com/rust-lang/libc/pull/2854

    New Contributors

    • @qrnch-jan made their first contribution in https://github.com/rust-lang/libc/pull/2791
    • @edigaryev made their first contribution in https://github.com/rust-lang/libc/pull/2803
    • @AlekseiNikiforovIBM made their first contribution in https://github.com/rust-lang/libc/pull/2809
    • @lattice0 made their first contribution in https://github.com/rust-lang/libc/pull/2814
    • @brunowonka made their first contribution in https://github.com/rust-lang/libc/pull/2823
    • @tiann made their first contribution in https://github.com/rust-lang/libc/pull/2830
    • @obrown06 made their first contribution in https://github.com/rust-lang/libc/pull/2847
    • @pabigot made their first contribution in https://github.com/rust-lang/libc/pull/2854

    Full Changelog: https://github.com/rust-lang/libc/compare/0.2.126...0.2.127

    Source code(tar.gz)
    Source code(zip)
  • 0.2.126(May 17, 2022)

    What's Changed

    • Update GitHub Actions actions/checkout@v2 to v3 by @dtolnay in https://github.com/rust-lang/libc/pull/2774
    • Remove FreeBSD 11 from CI by @Amanieu in https://github.com/rust-lang/libc/pull/2779
    • linux: add GRND_INSECURE constant by @zx2c4 in https://github.com/rust-lang/libc/pull/2743
    • haiku build fix by @devnexen in https://github.com/rust-lang/libc/pull/2772
    • openbsd: constantify some arguments of openpty() and forkpty() by @semarie in https://github.com/rust-lang/libc/pull/2773
    • Enable aio_{read,write}v on FreeBSD by @asomers in https://github.com/rust-lang/libc/pull/2775
    • Enable sock_txtime on mips musl target by @cww0614 in https://github.com/rust-lang/libc/pull/2776
    • add malloc_usable_size for musl by @jjl in https://github.com/rust-lang/libc/pull/2777
    • Add ENOTSUP constant for riscv64 musl by @nmeum in https://github.com/rust-lang/libc/pull/2784
    • Add LIO_READV and LIO_WRITEV on FreeBSD by @asomers in https://github.com/rust-lang/libc/pull/2780
    • Fix definition of kevent.data on 32-bit FreeBSD 12+ by @asomers in https://github.com/rust-lang/libc/pull/2782
    • Add DragonFlyBSD kinfo_proc and kinfo_lwp structs by @Freaky in https://github.com/rust-lang/libc/pull/2783
    • Add OpenBSD kinfo_proc struct by @Freaky in https://github.com/rust-lang/libc/pull/2786
    • Add android x86_64 user struct by @s1341 in https://github.com/rust-lang/libc/pull/2748
    • Promote pthread_getname_np and pthread_setname_np from glibc to linux by @colincross in https://github.com/rust-lang/libc/pull/2768
    • Allow unused macro rules by @Amanieu in https://github.com/rust-lang/libc/pull/2790
    • Bump version to 0.2.126 by @s1341 in https://github.com/rust-lang/libc/pull/2789

    New Contributors

    • @dtolnay made their first contribution in https://github.com/rust-lang/libc/pull/2774
    • @zx2c4 made their first contribution in https://github.com/rust-lang/libc/pull/2743
    • @cww0614 made their first contribution in https://github.com/rust-lang/libc/pull/2776
    • @jjl made their first contribution in https://github.com/rust-lang/libc/pull/2777
    • @nmeum made their first contribution in https://github.com/rust-lang/libc/pull/2784
    • @s1341 made their first contribution in https://github.com/rust-lang/libc/pull/2748
    • @colincross made their first contribution in https://github.com/rust-lang/libc/pull/2768

    Full Changelog: https://github.com/rust-lang/libc/compare/0.2.125...0.2.126

    Source code(tar.gz)
    Source code(zip)
  • 0.2.125(Apr 29, 2022)

    What's Changed

    • Add OpenBSD's futex.h. by @m-ou-se in https://github.com/rust-lang/libc/pull/2761
    • Add DragonFly umtx_{sleep, wakeup}. by @m-ou-se in https://github.com/rust-lang/libc/pull/2763
    • Add NetBSD's FUTEX_* constants. by @m-ou-se in https://github.com/rust-lang/libc/pull/2762
    • Add pthread_mutexattr_setprotocol and pthread_mutexattr_getprotocol on Linux by @rtzoeller in https://github.com/rust-lang/libc/pull/2731
    • Add unix adjtime support. by @guyru in https://github.com/rust-lang/libc/pull/2751
    • Add loongarch64 support by @zhaixiaojuan in https://github.com/rust-lang/libc/pull/2765
    • Add stpcpy, stpncpy, and strtok_r to unix by @carbotaniuman in https://github.com/rust-lang/libc/pull/2767
    • Add umtx_op to FreeBSD. by @m-ou-se in https://github.com/rust-lang/libc/pull/2770
    • haiku: improve platform compatibility by @jessicah in https://github.com/rust-lang/libc/pull/2769
    • Add riscv32 support for musl C library based linux platforms by @kraj in https://github.com/rust-lang/libc/pull/2540
    • Bump version to 0.2.125 by @Amanieu in https://github.com/rust-lang/libc/pull/2771

    New Contributors

    • @m-ou-se made their first contribution in https://github.com/rust-lang/libc/pull/2761
    • @guyru made their first contribution in https://github.com/rust-lang/libc/pull/2751
    • @zhaixiaojuan made their first contribution in https://github.com/rust-lang/libc/pull/2765
    • @carbotaniuman made their first contribution in https://github.com/rust-lang/libc/pull/2767

    Full Changelog: https://github.com/rust-lang/libc/compare/0.2.124...0.2.125

    Source code(tar.gz)
    Source code(zip)
  • 0.2.108(Nov 20, 2021)

    What's Changed

    • Add TIOCM_* constants for Illumos and Solaris. by @de-vri-es in https://github.com/rust-lang/libc/pull/2521
    • linux: Add open_how and related flags by @Fanael in https://github.com/rust-lang/libc/pull/2477
    • netbsd add uucred struct by @devnexen in https://github.com/rust-lang/libc/pull/2523
    • openbsd backtrace api addition by @devnexen in https://github.com/rust-lang/libc/pull/2527
    • freebsd sem api addition by @devnexen in https://github.com/rust-lang/libc/pull/2526
    • Scope in Send, Sync for wasi by @workingjubilee in https://github.com/rust-lang/libc/pull/2528
    • linux/android ctermid addition. by @devnexen in https://github.com/rust-lang/libc/pull/2532
    • Move more ioctl constants and flags to linux::arch::* modules. by @de-vri-es in https://github.com/rust-lang/libc/pull/2530
    • windows add printf/fprintf by @devnexen in https://github.com/rust-lang/libc/pull/2533
    • Add more FreeBSD consts by @GuillaumeGomez in https://github.com/rust-lang/libc/pull/2536
    • haiku dl_phdr_iterate addition (supports since beta3). by @devnexen in https://github.com/rust-lang/libc/pull/2534
    • freebsd add vmtotal sysctl query by @devnexen in https://github.com/rust-lang/libc/pull/2529
    • Suggest the mach2 crate instead by @JohnTitor in https://github.com/rust-lang/libc/pull/2539
    • Ignore TIOCREMOTE on macOS by @JohnTitor in https://github.com/rust-lang/libc/pull/2544
    • netbsd/openbsd ftok addition. by @devnexen in https://github.com/rust-lang/libc/pull/2542
    • Add base definitions for riscv64 + musl by @kanavin in https://github.com/rust-lang/libc/pull/2537
    • Add FreeBSD 14 CI by @JohnTitor in https://github.com/rust-lang/libc/pull/2545
    • Use libc specific type for architecture specific ioctl defines on Linux. by @de-vri-es in https://github.com/rust-lang/libc/pull/2550
    • netbsd add sysctldesc query. by @devnexen in https://github.com/rust-lang/libc/pull/2551
    • Add documentation for kinfo_proc fields by @GuillaumeGomez in https://github.com/rust-lang/libc/pull/2552
    • couple of ptrace query for openbsd by @devnexen in https://github.com/rust-lang/libc/pull/2553
    • Add more items for FreeBSD by @GuillaumeGomez in https://github.com/rust-lang/libc/pull/2549
    • Upgrade crate version to 0.2.108 by @GuillaumeGomez in https://github.com/rust-lang/libc/pull/2541

    New Contributors

    • @Fanael made their first contribution in https://github.com/rust-lang/libc/pull/2477
    • @kanavin made their first contribution in https://github.com/rust-lang/libc/pull/2537

    Full Changelog: https://github.com/rust-lang/libc/compare/0.2.107...0.2.108

    Source code(tar.gz)
    Source code(zip)
  • 0.2.107(Nov 7, 2021)

    What's Changed

    • Release 0.2.106 to incorporate build fix for #2484 by @joshtriplett in https://github.com/rust-lang/libc/pull/2494
    • solarish sendfilev fn flavor by @devnexen in https://github.com/rust-lang/libc/pull/2497
    • Skip CI on sparc64-unknown-linux-gnu for now by @JohnTitor in https://github.com/rust-lang/libc/pull/2503
    • DragonFly's devname_r takes a size_t len parameter by @rtzoeller in https://github.com/rust-lang/libc/pull/2489
    • Declare clock_settime for macOS. by @DimitrisJim in https://github.com/rust-lang/libc/pull/2496
    • fix cmsg test proposal by @devnexen in https://github.com/rust-lang/libc/pull/2501
    • sparc64: Update debian image to 11 (2021-10-20) to fix segfault on CI by @JohnTitor in https://github.com/rust-lang/libc/pull/2504
    • netbsd/openbsd add AI_* constants by @devnexen in https://github.com/rust-lang/libc/pull/2495
    • Enable clock_gettime on wasi by @coolreader18 in https://github.com/rust-lang/libc/pull/2499
    • Use link modifiers -bundle on musl and wasi target by @12101111 in https://github.com/rust-lang/libc/pull/2272
    • Add getresgid and getresuid to DragonFly, FreeBSD and OpenBSD by @rtzoeller in https://github.com/rust-lang/libc/pull/2505
    • add SO_*_FILTER for Android by @hhyhhy in https://github.com/rust-lang/libc/pull/2506
    • haiku: add missing ifaddrs definitions by @jessicah in https://github.com/rust-lang/libc/pull/2510
    • Add procctl data constants on freebsd by @niluxv in https://github.com/rust-lang/libc/pull/2511
    • netbsd libutil update by @devnexen in https://github.com/rust-lang/libc/pull/2512
    • win32 remove deprecated winapi part by @devnexen in https://github.com/rust-lang/libc/pull/2513
    • Document stat.st_blksize changes on DragonFly BSD by @rtzoeller in https://github.com/rust-lang/libc/pull/2487
    • netbsd add MAP_ALIGNED aliases by @devnexen in https://github.com/rust-lang/libc/pull/2516
    • Add memfd_create to linux and android by @jwellhofer in https://github.com/rust-lang/libc/pull/2069
    • Add TCGETS2 and TCSETS2 (and variants) ioctl constants for Linux. by @de-vri-es in https://github.com/rust-lang/libc/pull/2508
    • netbsd ext attrs api addition by @devnexen in https://github.com/rust-lang/libc/pull/2514
    • linux/android add POSIX_SPAWN_USEVFORK (mostly no-op now) extension. by @devnexen in https://github.com/rust-lang/libc/pull/2509
    • freebsd ptrace request update by @devnexen in https://github.com/rust-lang/libc/pull/2517
    • Move termios2 struct and ioctl constants to linux::arch::*. by @de-vri-es in https://github.com/rust-lang/libc/pull/2518
    • FreeBSD: add eventfd (since 13) by @unrelentingtech in https://github.com/rust-lang/libc/pull/2468
    • Bump libc to 0.2.107 by @workingjubilee in https://github.com/rust-lang/libc/pull/2515

    New Contributors

    • @12101111 made their first contribution in https://github.com/rust-lang/libc/pull/2272
    • @hhyhhy made their first contribution in https://github.com/rust-lang/libc/pull/2506
    • @jwellhofer made their first contribution in https://github.com/rust-lang/libc/pull/2069

    Full Changelog: https://github.com/rust-lang/libc/compare/0.2.106...0.2.107

    Source code(tar.gz)
    Source code(zip)
  • 0.2.105(Oct 23, 2021)

    What's Changed

    • Haiku: Add utmpx functions and constants by @GrayJack in https://github.com/rust-lang/libc/pull/2460
    • Fix most libc-test compile warnings and errors for DragonFly by @rtzoeller in https://github.com/rust-lang/libc/pull/2461
    • Deprecate XU_NGROUPS on DragonFly by @rtzoeller in https://github.com/rust-lang/libc/pull/2462
    • netbsd add missing posix_spawn constants. by @devnexen in https://github.com/rust-lang/libc/pull/2464
    • Adds pthread_mutexattr_[g|s]etrobust and pthread_mutex_consistent bindings by @awidegreen in https://github.com/rust-lang/libc/pull/2455
    • Freebsd items by @GuillaumeGomez in https://github.com/rust-lang/libc/pull/2451
    • add more errno constants to uclibc by @atopia in https://github.com/rust-lang/libc/pull/2466
    • apple further Big Sur update adding few more fn. by @devnexen in https://github.com/rust-lang/libc/pull/2459
    • Properly expose more constants on FreeBSD by @asomers in https://github.com/rust-lang/libc/pull/2465
    • Add fexecve() to DragonFly by @rtzoeller in https://github.com/rust-lang/libc/pull/2467
    • Adding some NT_* consts from elf.h by @irgstg in https://github.com/rust-lang/libc/pull/2463
    • Add missing CPU_* macros to android, and sync with Linux by @joshtriplett in https://github.com/rust-lang/libc/pull/2470
    • linux: Add CLOSE_RANGE_* flags by @NeoRaider in https://github.com/rust-lang/libc/pull/2471
    • Add NETLINK_EXT_ACK and NETLINK_GET_STRICT_CHK on Linux by @tklauser in https://github.com/rust-lang/libc/pull/2453
    • darwin libproc Big Sur update. by @devnexen in https://github.com/rust-lang/libc/pull/2472
    • Add a couple pthread functions for redox by @coolreader18 in https://github.com/rust-lang/libc/pull/2473
    • linux_like: Add CLONE_PIDFD flag by @NeoRaider in https://github.com/rust-lang/libc/pull/2474
    • freebsd add numa domain api by @devnexen in https://github.com/rust-lang/libc/pull/2475
    • Upgrade crate version to 0.2.105 by @GuillaumeGomez in https://github.com/rust-lang/libc/pull/2469

    New Contributors

    • @awidegreen made their first contribution in https://github.com/rust-lang/libc/pull/2455
    • @atopia made their first contribution in https://github.com/rust-lang/libc/pull/2466
    • @irgstg made their first contribution in https://github.com/rust-lang/libc/pull/2463

    Full Changelog: https://github.com/rust-lang/libc/compare/0.2.104...0.2.105

    Source code(tar.gz)
    Source code(zip)
  • 0.2.104(Oct 16, 2021)

  • 0.2.102(Sep 15, 2021)

  • 0.2.100(Aug 21, 2021)

  • 0.2.99(Aug 10, 2021)

  • 0.2.98(Jul 7, 2021)

  • 0.2.97(Jun 11, 2021)

  • 0.2.96(Jun 9, 2021)

  • 0.2.95(May 25, 2021)

  • 0.2.94(Apr 26, 2021)

  • 0.2.93(Apr 6, 2021)

  • 0.2.92(Mar 30, 2021)

  • 0.2.91(Mar 23, 2021)

Owner
The Rust Programming Language
The Rust Programming Language
Rust-ffi-guide - A guide for doing FFI using Rust

Using unsafe for Fun and Profit A guide to traversing the FFI boundary between Rust and other languages. A rendered version is available here. This gu

Michael Bryan 261 Dec 1, 2022
A cross-platform crate with FFI bindings to allow for complex vehicle ECU diagnostics.

ecu_diagnostics A cross-platform crate with FFI bindings to allow for complex vehicle ECU diagnostics. IMPORTANT Currently this crate is not 100% read

Ashcon Mohseninia 80 Dec 24, 2022
Handy macro to generate C-FFI bindings to Rust for Haskell

hs-bindgen Handy macro to generate C-FFI bindings to Rust for Haskell. This library intended to work best in a project configured by cargo-cabal. N.B.

Yvan Sraka 32 Feb 16, 2023
Rust in Haskell FFI Example

Provides an example for using Rust in Haskell. To use this you'll need cargo, rustc, cabal and GHC installed. To execute the example run the following

Michael Gattozzi 21 Oct 1, 2022
A safe Rust FFI binding for the NVIDIA® Tools Extension SDK (NVTX).

NVIDIA® Tools Extension SDK (NVTX) is a C-based Application Programming Interface (API) for annotating events, code ranges, and resources in your applications. Official documentation for NVIDIA®'s NVTX can be found here.

Spencer Imbleau 78 Jan 2, 2023
Rust Attribute-Based Encryption library rabe's C FFI binding , support CP-ABE and KP-ABE encrypt and decrypt, submodule of Rabe.Core c# library.

Rabe-ffi Rust Attribute-Based Encryption library rabe's C FFI binding , support CP-ABE and KP-ABE encrypt and decrypt, submodule of Rabe.Core c# libra

Aya0wind 2 Oct 10, 2022
📝 A template for creating WASM + Typescript + Rust workflow libraries.

Create Rust + TypeScript libraries with ease! PR'S WELCOMED! ✨ Inspiration I wanted to create a WebAssembly/Rust library with additional JS features,

Shaoru Ian Huang 25 Dec 24, 2022
A project for generating C bindings from Rust code

cbindgen   Read the full user docs here! cbindgen creates C/C++11 headers for Rust libraries which expose a public C API. While you could do this by h

Ryan Hunt 1.7k Jan 3, 2023
Rust-JDBC bindings

jdbc A Rust library that allows you to use JDBC and JDBC drivers. Usage First, add the following to your Cargo.toml: [dependencies] jdbc = "0.1" Next,

Aurora 18 Feb 9, 2022
Lua 5.3 bindings for Rust

rust-lua53 Aims to be complete Rust bindings for Lua 5.3 and beyond. Currently, master is tracking Lua 5.3.3. Requires a Unix-like environment. On Win

J.C. Moyer 150 Dec 14, 2022
Safe Rust bindings to Lua 5.1

rust-lua Copyright 2014 Lily Ballard Description This is a set of Rust bindings to Lua 5.1. The goal is to provide a (relatively) safe interface to Lu

Lily Ballard 124 Jan 5, 2023
mruby safe bindings for Rust

mrusty. mruby safe bindings for Rust mrusty lets you: run Ruby 1.9 files with a very restricted API (without having to install Ruby) reflect Rust stru

Anima 200 Oct 12, 2022
Rust bindings for writing safe and fast native Node.js modules.

Rust bindings for writing safe and fast native Node.js modules. Getting started Once you have the platform dependencies installed, getting started is

The Neon Project 7k Jan 4, 2023
Objective-C Runtime bindings and wrapper for Rust.

Objective-C Runtime bindings and wrapper for Rust. Documentation: http://ssheldon.github.io/rust-objc/objc/ Crate: https://crates.io/crates/objc Messa

Steven Sheldon 336 Jan 2, 2023
High-level Rust bindings to Perl XS API

Perl XS for Rust High-level Rust bindings to Perl XS API. Example xs! { package Array::Sum; sub sum_array(ctx, array: AV) { array.iter().map(|

Vickenty Fesunov 59 Oct 6, 2022
Rust <-> Python bindings

rust-cpython Rust bindings for the python interpreter. Documentation Cargo package: cpython Copyright (c) 2015-2020 Daniel Grunwald. Rust-cpython is l

Daniel Grunwald 1.7k Dec 29, 2022
Rust bindings for the Python interpreter

PyO3 Rust bindings for Python. This includes running and interacting with Python code from a Rust binary, as well as writing native Python modules. Us

PyO3 7.2k Jan 4, 2023
Safe Rust <---> GraalVM Polyglot bindings using procedural macros

The class macro is the primary way to generate bindings to Java types; it will generate a struct (with generics if specified) that implements Pass and Receive and has all the methods you give stubs for. The methods generated can be used like normal rust methods, however mutability is not enforced. The fully-qualified type name should precede a block containing method and constructor stubs. Java primitives like char, int, and byte are aliased to corresponding Rust types.

Alec Petridis 33 Dec 28, 2022
Javascript wrapper bindings for diamond types

Diamond JS wrapper library This is a javascript / WASM wrapper around diamond types. This code is currently experimental WIP. Do not trust this for an

Seph Gentle 14 Jun 16, 2022