2 unstable releases

0.2.0 Aug 11, 2023
0.1.0 Aug 11, 2023

#2202 in Database interfaces

Download history 41/week @ 2024-01-27 72/week @ 2024-02-03 165/week @ 2024-02-10 90/week @ 2024-02-17 45/week @ 2024-02-24 18/week @ 2024-03-02 10/week @ 2024-03-09 167/week @ 2024-03-16 53/week @ 2024-03-23 28/week @ 2024-03-30 2/week @ 2024-04-06 69/week @ 2024-04-13

213 downloads per month
Used in 2 crates (via uu_w)

ISC license

17KB
438 lines

utmpx

Rust bindings and wrapper around utmpx.h. utmpx.h declares a structure and functions to query (and update) the database of currently logged in users.

Because POSIX only defines a minimal set of fields, different implementations add different fields on top. This library is written with musl and GNU/Linux in mind. Patches with implementations for other platforms are welcome.

See also

Licence

This project is licensed under the ISC licence. See LICENCE for details.


lib.rs:

This library contains bindings to the types and functions in utmpx.h.

The [sys] module contains the raw bindings. The root module contains idiomatic wrappers.

The underlying utmpx functions work with per-thread cursors. Care should be taken when using this in multiple threads, but all functions should be usable from different threads.

For platforms that implement utmp.h but not utmpx.h, the intent is for wrappers to call the utmp.h equivalents.

Dependencies

~42KB