whatsmeow-sys

Crates.iowhatsmeow-sys
lib.rswhatsmeow-sys
version0.1.4
created_at2025-12-28 18:15:28.484432+00
updated_at2025-12-29 00:17:28.895337+00
descriptionRaw FFI bindings to the WhatsApp Go bridge DLL for whatsmeow
homepage
repositoryhttps://github.com/sabry-awad97/whatsmeow-rs
max_upload_size
id2009231
size29,052
Sabry Awad (sabry-awad97)

documentation

README

whatsmeow-sys

Raw FFI bindings to the WhatsApp Go bridge via WhatsMeow.

⚠️ Low-level crate - Use whatsmeow for the safe, idiomatic API.

FFI Functions

// Create client with custom device name
wm_client_new(db_path, device_name) -> ClientHandle

// Connection
wm_client_connect(handle) -> WmResult
wm_client_disconnect(handle) -> WmResult
wm_client_destroy(handle)

// Events
wm_poll_event(handle, buf, buf_len) -> c_int

// Messaging
wm_send_message(handle, jid, text) -> WmResult
wm_send_image(handle, jid, data, data_len, mime_type, caption) -> WmResult

Error Codes

Code Constant Meaning
0 WM_OK Success
-1 WM_ERR_INIT Initialization failed
-2 WM_ERR_CONNECT Connection failed
-3 WM_ERR_DISCONNECTED Client disconnected
-4 WM_ERR_INVALID_HANDLE Invalid handle
-5 WM_ERR_BUFFER_TOO_SMALL Buffer too small

Requirements

  • Go 1.21+ with CGO enabled
  • Windows: MSVC toolchain
  • Linux/macOS: GCC or Clang

License

MIT

Commit count: 0

cargo fmt