#utilities #projects #function

yanked coutils

A set of useful functions for Rust

7 stable releases

2.0.0 Apr 20, 2024
1.6.0 Apr 4, 2024
1.5.0 Aug 4, 2023
1.4.0 Jul 8, 2023

#530 in #projects


Used in 4 crates (3 directly)

Custom license

30KB
578 lines

COUTILS

GitHub CI

A set of useful functions for Rust.

ABOUT

I found myself re-writing the same functions a million times in different Rust projects. Because this is not efficient and is quite time-consuming, I thought I'd unify these common functions into a library. This is that library. Coutils is short for Common Utilities. Enjoy.

INSTALLATION

To use Coutils in your Rust project, add this line to your project's Cargo.toml's [dependencies] section:

coutils = "2.0.0"

Optionally, you can decide which features you would like to enable. Coutils offers the following features:

  • filesystem: A feature to work with files and directories.
  • networking: A feature to clone Git repositories.
  • time: A feature to get current time information.

To enable one or all of the available features, add this line to your Rust project's Cargo.toml:

coutils = { version = "2.0.0", features = [ "feature_name" ] }

I added features because some implementations of Lib C do not play nice with anything to do with networking, like MUSL. Additionally, using Coutils in WASM projects is easier if certain features are enabled or disabled.

USAGE

To check out this crate's API, please visit the documentation page.

CHANGELOG

Version 1.0.0

  • Initial release.
  • Upload to GitHub.

Version 1.1.0

  • Added the has_item method.
  • Added unit tests.
  • Split the code into modules.

Version 1.2.0

  • Split everything into sub-modules.
  • Refactored some functions.
  • Added some new entities.
  • Added a host of functions and entities.
  • Added instructions for using and viewing API documentation.

Version 1.3.0

  • Added a function to copy files from src/test_file.txt to dest/test_file.txt.
  • Updated documentation.
  • Bumped version number.

Version 1.4.0

  • Added better error-catching architecture via the Result enum.
  • Improved documentation.
  • Added a function to get the current time as a formatted string.

Version 1.5.0

  • Improved documentation.
  • Removed dependencies that will break WASM builds.

Version 2.0.0

  • Improved documentation.
  • Added a module for cloning Git repositories.
  • Added optional features to the crate.
  • Relicensed the project under the DSL v1.
  • Fixed the way features are handled.
  • Added the TimeNow structure.

NOTE

  • Coutils by Alexander Abraham a.k.a. "Angel Dollface"
  • Licensed under the DSL v1.

Dependencies

~0.2–2MB
~45K SLoC