| Crates.io | ferrisup-common |
| lib.rs | ferrisup-common |
| version | 0.2.5 |
| created_at | 2025-06-17 21:11:27.739009+00 |
| updated_at | 2025-10-05 21:18:06.251049+00 |
| description | Shared utilities and common functionality for the FerrisUp project |
| homepage | |
| repository | https://github.com/Jitpomi/ferrisup |
| max_upload_size | |
| id | 1716300 |
| size | 50,707 |
Shared utilities and common functionality for the FerrisUp project. This crate provides core functionality used by the main FerrisUp CLI application.
The ferrisup_common crate serves as a shared library for the FerrisUp project, containing reusable utilities and functions that are used across different components of the project. By centralizing these common functions, we ensure consistency and reduce code duplication.
fs module)create_directory: Creates directories with proper error handlingcopy_directory: Recursively copies directories with platform-specific handlingvisit_dirs: Traverses directories recursivelycargo module)read_cargo_toml: Parses Cargo.toml files into structured datawrite_cargo_toml_content: Writes modified Cargo.toml content back to diskupdate_workspace_members: Manages workspace member entries in Cargo.tomlupdate_cargo_with_dependencies: Adds or updates dependencies in Cargo.toml filesto_pascal_case: Converts strings like "hello_world" to "HelloWorld"to_snake_case: Converts strings like "HelloWorld" to "hello_world"This crate is designed to work on both Unix-based systems and Windows, using Rust's conditional compilation features (#[cfg(unix)]) to handle platform-specific code, particularly for file permissions.
This crate is primarily used as an internal dependency for the FerrisUp CLI application. If you're developing or extending FerrisUp, you can use these utilities in your code:
// File system operations
use ferrisup_common::fs::create_directory;
use ferrisup_common::fs::copy_directory;
// Cargo.toml manipulation
use ferrisup_common::cargo::read_cargo_toml;
use ferrisup_common::cargo::update_workspace_members;
// String utilities
use ferrisup_common::to_pascal_case;
use ferrisup_common::to_snake_case;
When making changes to the ferrisup_common crate, ensure that:
The ferrisup_common crate provides essential utilities and functionality for the FerrisUp project, ensuring consistency and reducing code duplication across the project. Its cross-platform compatibility and robust error handling make it a reliable dependency for the FerrisUp CLI application.