| Crates.io | tencent-im-sys |
| lib.rs | tencent-im-sys |
| version | 0.1.0 |
| created_at | 2026-01-15 14:07:59.559224+00 |
| updated_at | 2026-01-15 14:07:59.559224+00 |
| description | [Unofficial] Tencent IM SDK Rust FFI Bindings |
| homepage | |
| repository | http://github.com/poohpooher/tencent-im-sys |
| max_upload_size | |
| id | 2045637 |
| size | 682,839 |
https://rust-lang.github.io/rust-bindgen/requirements.html
After creating an sdk directory in the project's Manifest Dir, place TIM.lib and TIM.dll of Tencent IM SDK.
// build.rs
use std::fs;
use std::path::{Path, PathBuf};
fn main() {
let manifest_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
let mut sdk_path = PathBuf::new(manifest_dir);
sdk_path.push("sdk");
println!("cargo:rustc-link-search=native={}", sdk_path.display());
println!("cargo:rustc-link-lib=static=ImSDK");
println!("cargo:rerun-if_changed=build.rs");
println!("cargo:rerun-if-changed=sdk/ImSDK.lib");
// Copy dll
let out_dir = env::var("OUT_DIR").unwrap();
let dest_path = Path::new(&out_dir).join("../../../").join("ImSDK.dll");
let dll_src = "sdk/ImSDK.dll";
fs::copy(dll_src, dest_path).unwrap();
}