diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000000000000000000000000000000000000..9d652ec388180d42d321fb006d93663d2313f512 --- /dev/null +++ b/README.en.md @@ -0,0 +1,44 @@ +# Quick-Sync SDK + +Quick-Sync SDK is a Rust SDK designed to implement fast synchronization functionality. It provides interfaces between the client and core services, supporting key features such as database initialization and WebSocket communication. + +## Key Features + +- **Modular Architecture**: The project is divided into multiple modules, including core services, client, environment configuration, SQL management, and more. +- **WebSocket Support**: Asynchronous WebSocket communication is implemented through `WebSocketServer`. +- **Database Management**: SeaORM is used to provide database modeling and connection initialization. +- **Unified Error Handling**: All modules implement a unified error type and support the `Display` and `From` traits for easy error conversion and display. + +## Project Structure + +- **core-sdk**: Core service binary that provides the main service logic. +- **test-client**: Test client binary used to test synchronization logic. +- **client-sdk**: Client SDK module that provides the `QuickSyncClient` for client communication. +- **core**: Core service module containing the WebSocket service and core error handling. +- **env-config**: Environment configuration module that provides database path retrieval and constant configuration. +- **sql-manager**: Database management module that uses SeaORM for database connection and initialization. +- **webdav-client**: WebDAV client test module (currently contains only test functions). +- **windows-hooks**: Windows hooks test module (currently contains only test functions). + +## Technologies Used + +- Rust asynchronous runtime (Tokio) +- SeaORM (for database modeling and connection) +- Tungstenite (WebSocket communication) +- Directory and environment configuration management + +## Error Types + +- `ClientError`: Error type within the client SDK, supporting conversion from multiple error types. +- `CoreError`: Error type for the core service module. +- `WebSocketError`: Errors that may occur during WebSocket communication. +- `EnvConfigError`: Errors occurring during environment configuration and path retrieval. +- `SqlManagerError`: Errors occurring during database initialization and operations. + +## Usage + +For detailed usage instructions, please refer to the SDK documentation and API descriptions of each module. + +## License + +MIT License. Please see the [LICENSE](https://gitee.com/quick-sync/quick-sync-sdk/blob/master/LICENSE) file for details. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..8061eecb146705aff6a18ba9fbf5f14d94d1a790 --- /dev/null +++ b/README.md @@ -0,0 +1,46 @@ + + +# Quick-Sync SDK + +Quick-Sync SDK 是一个用于实现快速同步功能的 Rust SDK,提供了客户端与核心服务的接口,支持数据库初始化、WebSocket 通信等关键功能。 + +## 功能特点 + +- **模块化架构**:项目分为多个模块,包括核心服务、客户端、环境配置、SQL 管理等。 +- **WebSocket 支持**:通过 `WebSocketServer` 实现异步 WebSocket 通信。 +- **数据库管理**:使用 SeaORM 提供数据库建模与连接初始化功能。 +- **错误处理统一**:各模块均实现了统一的错误类型,并支持 `Display` 与 `From` trait,便于错误转换和展示。 + +## 项目结构 + +- **core-sdk**:核心服务二进制程序,提供主服务逻辑。 +- **test-client**:测试客户端二进制程序,用于测试同步逻辑。 +- **client-sdk**:客户端 SDK 模块,提供 `QuickSyncClient` 用于客户端通信。 +- **core**:核心服务模块,包含 WebSocket 服务与核心错误处理。 +- **env-config**:环境配置模块,提供数据库路径获取和常量配置。 +- **sql-manager**:数据库管理模块,使用 SeaORM 实现数据库连接与初始化。 +- **webdav-client**:WebDAV 客户端测试模块(目前仅包含测试函数)。 +- **windows-hooks**:Windows 钩子测试模块(目前仅包含测试函数)。 + +## 使用技术 + +- Rust 异步运行时(Tokio) +- SeaORM(用于数据库模型与连接) +- Tungstenite(WebSocket 通信) +- 目录与环境配置管理 + +## 错误类型 + +- `ClientError`:客户端 SDK 中的错误类型,支持从多种错误类型转换。 +- `CoreError`:核心服务模块的错误类型。 +- `WebSocketError`:WebSocket 通信中可能出现的错误。 +- `EnvConfigError`:环境配置与路径获取过程中发生的错误。 +- `SqlManagerError`:数据库初始化与操作中的错误。 + +## 使用方法 + +具体使用方法请参考 SDK 文档与各模块的 API 说明。 + +## 许可证 + +MIT 许可证,请参阅 [LICENSE](https://gitee.com/quick-sync/quick-sync-sdk/blob/master/LICENSE) 文件。 \ No newline at end of file