7 stable releases

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

#283 in Filesystem

Download history 18/week @ 2023-12-24 9/week @ 2024-01-14 1/week @ 2024-01-21 12/week @ 2024-01-28 10/week @ 2024-02-04 6/week @ 2024-02-11 10/week @ 2024-02-18 27/week @ 2024-02-25 11/week @ 2024-03-03 21/week @ 2024-03-10 9/week @ 2024-03-17 4/week @ 2024-03-24 160/week @ 2024-03-31 10/week @ 2024-04-07

187 downloads per month
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–2.5MB
~53K SLoC