libbsd-sys 0.1.1

Raw FFI bindings to libbsd
Documentation
  • Coverage
  • 0.61%
    1 out of 163 items documented0 out of 3 items with examples
  • Size
  • Source code size: 26.25 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.82 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 36s Average build duration of successful builds.
  • all releases: 28s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • mrdomino/libbsd-sys
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • mrdomino

libbsd-sys - raw FFI bindings to libbsd

Caveat non emptor: This crate is AI-generated, perhaps even “vibe-coded,” and free as in “you get what you pay for.”

The readme, though — that’s by me (including the em-dashes.)

I… requested that this code be written… in order to scratch a very specific itch: I wanted to use readpassphrase(3) in a different crate, but to be able to pull my implementation from libbsd or Darwin/BSD libc. As there was not yet a libbsd-sys, I decided to make one. As it was a pretty mechanical task, and as much of the software world is going this way anyway —as though entering an accretion disk around a singularity, or perhaps just circling a drain— I decided to ask Claude to help me.

I will endeavor, with the full force of somebody not getting compensated at all for this and working on it on occasional evenings and weekends, to resolve any bugs and implement any reasonable feature requests.

I do not mean to be squatting on this highly valuable crate name with slop. I do not think this is slop-grade work; I have made some effort to at least check that the code compiles and matches the relevant APIs on the relevant platforms. That said, if a trustworthy person were to come along with a human-generated alternative of reasonable quality, I am quite open to ceding the name.

Usage

Add the following to your Cargo.toml:

[dependencies]
libbsd-sys = "0.1"

Features

On Linux, the following crate features are available:

  • static requests static linkage of libbsd.
  • overlay requests libbsd-overlay instead of libbsd, so that downstream crates that compile C code can use plain <string.h> instead of <bsd/string.h>.

On non-Linux, these features are no-ops.

Requirements

On Linux, libbsd is required. Usually the package will be named something like libbsd-dev or libbsd-devel. If you do not use the static feature, then your users will also have to have the non-devel libbsd package installed.

We depend on at least libbsd 0.11.