Commit Graph

8 Commits

Author SHA1 Message Date
Mahmoud-Emad
502e345f91 feat: Enhance service manager with zinit socket discovery and systemd fallback
- Improve Linux support by automatically discovering zinit sockets
  using environment variables and common paths.
- Add fallback to systemd if no zinit server is detected.
- Enhance README with detailed instructions for zinit usage,
  including custom socket path configuration.
- Add example demonstrating zinit socket discovery.
- Add logging to show socket discovery process.
- Add unit tests for service manager creation and socket discovery.
2025-07-02 16:37:27 +03:00
Mahmoud-Emad
352e846410 feat: Improve Zinit service manager integration
- Handle arguments and working directory correctly in Zinit: The
  Zinit service manager now correctly handles arguments and
  working directories passed to services, ensuring consistent
  behavior across different service managers.  This fixes issues
  where commands would fail due to incorrect argument parsing or
  missing working directory settings.

- Simplify Zinit service configuration: The Zinit service
  configuration is now simplified, using a more concise and
  readable format. This improves maintainability and reduces the
  complexity of the service configuration process.

- Refactor Zinit service start: This refactors the Zinit service
  start functionality for better readability and maintainability.
  The changes improve the code structure and reduce the complexity
  of the code.
2025-07-02 13:39:11 +03:00
Mahmoud-Emad
95122dffee feat: Improve service manager testing and error handling
- Add comprehensive testing instructions to README.
- Improve error handling in examples to prevent crashes.
- Enhance launchctl error handling for production safety.
- Improve zinit error handling for production safety.
- Remove obsolete plan_to_fix.md file.
- Update Rhai integration tests for improved robustness.
- Improve service manager creation on Linux with systemd fallback.
2025-07-02 12:05:03 +03:00
Mahmoud-Emad
a63cbe2bd9 Fix service manager examples to use production-ready API
- Updated simple_service.rs to use start(config) instead of create() + start(name)
- Updated service_spaghetti.rs to use the same unified API
- Fixed factory function calls to use create_service_manager() without parameters
- All examples now compile and work with the production-ready synchronous API
- Maintains backward compatibility while providing cleaner interface
2025-07-02 10:46:47 +03:00
Mahmoud-Emad
1e4c0ac41a Resolve merge conflicts - keep production-ready service manager implementation
- Resolved conflicts in service_manager/src/lib.rs
- Resolved conflicts in service_manager/src/launchctl.rs
- Resolved conflicts in service_manager/src/zinit.rs
- Resolved conflicts in service_manager/README.md
- Kept our production-ready synchronous API design
- Maintained comprehensive service lifecycle management
- Preserved cross-platform compatibility (macOS/Linux)
- All tests passing and ready for production use
2025-07-02 10:34:56 +03:00
Timur Gordon
32339e6063 service manager add examples and improvements 2025-07-02 05:50:18 +02:00
Mahmoud-Emad
131d978450 feat: Add service manager support
- Add a new service manager crate for dynamic service management
- Integrate service manager with Rhai for scripting
- Provide examples for circle worker management and basic usage
- Add comprehensive tests for service lifecycle and error handling
- Implement cross-platform support for macOS and Linux (zinit/systemd)
2025-07-01 18:00:21 +03:00
Timur Gordon
b4e370b668 add service manager sal 2025-07-01 09:11:45 +02:00