mbus-ffi 0.13.0

Native C FFI and browser WASM bindings for modbus-rs client APIs, with optional generated server bindings
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Client-side WASM/JS bindings for the modbus-rs stack.
//!
//! Four layers:
//! 1. `WasmWsTransport` - implements `Transport` over a browser `WebSocket`.
//! 2. `WasmAppRouter` - implements the `mbus-client` app traits; resolves/rejects
//!    JS `Promise`s instead of calling user callbacks directly.
//! 3. `WasmModbusClient` - `#[wasm_bindgen]` API for WebSocket/TCP gateway usage.
//! 4. `WasmSerialModbusClient` - `#[wasm_bindgen]` API for Web Serial RTU/ASCII usage.
//!
//! Both public client types use the same internal app/router layer so JS-facing
//! response shapes stay consistent across transports.

mod app;
mod net_client;
mod serial_client;

pub use net_client::WasmModbusClient;
pub use serial_client::{WasmSerialModbusClient, WasmSerialPortHandle, request_serial_port};