{"id":50862587,"url":"https://github.com/pseudocodes/datacollect-rs","last_synced_at":"2026-06-14T22:05:35.487Z","repository":{"id":343422508,"uuid":"1177659217","full_name":"pseudocodes/datacollect-rs","owner":"pseudocodes","description":"Rust bindings for CTP DataCollect  via libloading","archived":false,"fork":false,"pushed_at":"2026-03-10T09:17:27.000Z","size":3970,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-10T16:10:06.699Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pseudocodes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-10T08:41:02.000Z","updated_at":"2026-03-10T09:17:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/pseudocodes/datacollect-rs","commit_stats":null,"previous_names":["pseudocodes/datacollect-rs"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/pseudocodes/datacollect-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pseudocodes%2Fdatacollect-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pseudocodes%2Fdatacollect-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pseudocodes%2Fdatacollect-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pseudocodes%2Fdatacollect-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pseudocodes","download_url":"https://codeload.github.com/pseudocodes/datacollect-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pseudocodes%2Fdatacollect-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34339257,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-14T22:05:31.349Z","updated_at":"2026-06-14T22:05:35.482Z","avatar_url":"https://github.com/pseudocodes.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# datacollect-rs\n\nCTP 看穿式终端信息采集模块的 Rust 封装。\n\n通过 `libloading` 动态加载各平台（Linux / macOS / Windows）的 DataCollect 动态库，提供统一的 Rust 接口。\n\n## 支持的平台和函数\n\n| 函数 | macOS | Linux | Windows |\n|------|:-----:|:-----:|:-------:|\n| `get_system_info()` | ✅ | ✅ | ✅ |\n| `get_system_info_un_aes()` | ✅ | ✅ | ❌ |\n| `get_api_version()` | ✅ | ✅ | ✅ |\n| `get_real_system_info()` | ❌ | ✅ | ❌ |\n\n## 动态库文件\n\n| 平台 | 库文件 |\n|------|--------|\n| Linux | `LinuxDataCollect.so` |\n| macOS | `MacDataCollect.framework` |\n| Windows | `WinDataCollect.dll` |\n\n## 使用方式\n\n```toml\n[dependencies]\ndatacollect-rs = { path = \"../datacollect-rs\" }\n```\n\n```rust\nuse datacollect_rs::{DataCollectApi, resolve_datacollect_lib_path};\n\nfn main() {\n    // 自动解析平台对应的动态库路径\n    let lib_path = resolve_datacollect_lib_path(\"/path/to/libs/\");\n    let api = DataCollectApi::new(\u0026lib_path).expect(\"加载失败\");\n\n    // 获取版本号\n    if let Some(ver) = api.get_api_version() {\n        println!(\"DataCollect API: {}\", ver);\n    }\n\n    // 采集终端信息\n    let (data, len) = api.get_system_info().expect(\"采集失败\");\n    println!(\"采集到 {} 字节\", len);\n}\n```\n\n## 运行示例\n\n```bash\ncargo run --example basic -- /path/to/动态库目录/\n```\n\n## 参考\n\n- 参照 [ctp-dyn](https://github.com/pseudocodes/ctp2rs/tree/master/ctp-dyn) 的 `libloading` 动态加载方式\n- 仅依赖 `libloading`，无需 `bindgen` / `build.rs`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpseudocodes%2Fdatacollect-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpseudocodes%2Fdatacollect-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpseudocodes%2Fdatacollect-rs/lists"}