3 releases

0.1.2 Jul 2, 2024
0.1.1 Mar 18, 2020
0.1.0 Mar 18, 2020

#217 in Unix APIs

Download history 254/week @ 2024-03-31 470/week @ 2024-04-07 229/week @ 2024-04-14 450/week @ 2024-04-21 178/week @ 2024-04-28 466/week @ 2024-05-05 505/week @ 2024-05-12 642/week @ 2024-05-19 509/week @ 2024-05-26 361/week @ 2024-06-02 507/week @ 2024-06-09 65/week @ 2024-06-16 337/week @ 2024-06-23 467/week @ 2024-06-30 31/week @ 2024-07-07 265/week @ 2024-07-14

1,101 downloads per month

MPL-2.0-no-copyleft-exception

140KB
3K SLoC

Coreutils Core

GitHub license

It's a library used by this implementation of coreutils in Rust programming language.

Think of it as a crate to create coreutils tools.

Here lies several abstraction for Unix/Unix-like structures in the OS supported by the project.

  • Backup module that handles creating backups
  • Input module to get user confirmation
  • mktemp: Wrappers for libc mkstemp(3) and mkdtemp(3)
  • mkfifo: Wrapper for libc mkfifo(3) and maybe expandable for other FIFO related functions
  • OS module with abstractions for more os specific stuff
    • Audit structs and syscall for FreeBSD and MacOS
    • group: Module with structures and methods to handle groups information
    • load: Safe abstraction to system function to get load of the system
    • login_name: Safe abstractions to system function to get caller login name
    • passwd: Module that holds structures and methods to handle system user information
    • process: Safe abstraction related to process handling
    • routing_table: Routing table abstractions for OpenBSD
    • time: OS functions to handle system time (set system time)
    • tty: Abstractions to check if a FileDescriptor is a TTY and ways to get the TTY name
    • utmp and utmpx: Types representing account database on unix and methods to use them
    • utsname: Types to aquire system information

It also re-export major needed things from bstr, a crate with a string type for Rust that is not required to be valid UTF-8, as well as time and libc

License

This Source Code Form is subject to the terms of the Mozilla Public License, v.2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0.

Dependencies

~6MB
~115K SLoC