shimexe-core
Core library for shimexe - a modern, cross-platform executable shim manager with environment variable expansion and TOML configuration support.
Overview
shimexe-core provides the foundational functionality for creating and managing executable shims. It offers a flexible and extensible architecture for building shim management tools.
Features
- Cross-platform support: Works on Windows, macOS, and Linux
- TOML configuration: Easy-to-read and write configuration format
- Environment variable expansion: Dynamic path resolution with shell-style variable expansion
- Template engine: Flexible argument and environment variable templating
- Auto-update support: Built-in mechanisms for keeping shims up-to-date
- Extensible architecture: Trait-based design for customization
- Async support: Built with async/await for better performance
Core Components
ShimConfig
Manages shim configuration including target executable paths, arguments, and environment variables.
ShimRunner
Executes shims with proper argument handling and environment setup.
TemplateEngine
Provides variable expansion and templating for dynamic configuration.
ShimUpdater
Handles automatic updates for shim configurations and target executables.
Usage
Add this to your Cargo.toml:
[]
= "0.1.0"
Basic Example
use *;
async
Configuration Example
# shim.toml
[]
= "${HOME}/bin/my-tool"
= ["--config", "${CONFIG_DIR}/config.yaml"]
[]
= "${PATH}:${HOME}/bin"
= "${HOME}/.my-tool"
[]
= "my-tool"
= "1.0.0"
= "My awesome tool"
Advanced Usage
use *;
// Custom shim runner with additional features
API Documentation
For detailed API documentation, visit docs.rs/shimexe-core.
Contributing
Contributions are welcome! Please see the main repository for contribution guidelines.
License
This project is licensed under the MIT License - see the LICENSE-MIT file for details.