| Crates.io | workspacer-config |
| lib.rs | workspacer-config |
| version | 0.1.2 |
| created_at | 2025-04-01 01:09:35.5786+00 |
| updated_at | 2025-07-12 23:34:14.653521+00 |
| description | A Rust crate to manage and utilize workspace configuration data in `.ws` directories for local and global setups, focusing on file management and configuration handling. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1614281 |
| size | 153,295 |
workspacer-config is a Rust crate designed to handle configuration data stored in .ws directories. Utilizing this crate facilitates file management and configuration settings for local or global workspaces, intended for various purposes, such as readme writing or test upgrading.
To integrate workspacer-config into your project, leverage its two primary structures: WorkspacerConfig and WorkspacerDir.
This struct represents the configuration data that resides within workspacer-config files, encoded in TOML format. It is solely responsible for dealing with the data itself and does not involve directory creation logic.
WorkspacerDir abstracts the operation of .ws directories. This struct differentiates between the directory itself and the configuration file within, and offers various utility methods:
readme-writer-workspace.To manage a .ws directory:
let local_dir = WorkspacerDir::local();
local_dir.ensure_dir_exists()?;
let config = local_dir.load_or_create_config_async().await?;
Most directory and file operations in workspacer-config are asynchronous, allowing for efficient non-blocking I/O. This design aligns with modern Rust practices, providing robust functionality for extensive workspace infrastructure.
The crate utilizes WorkspacerFallbackError to encapsulate potential error cases throughout the workspace directory and configuration operations.
Integrate easily into existing Rust projects by importing this crate and using its considerate APIs for workspace directory management.