PC <- deskmsg -> devices, support Rust, C, C++ and Node.js.
deskmsg = mqtt server + http static file server + mdns-sd or ble service discovery.
mqtt server used rmqtt.
mdns-sd used mdns-sd.
ble used btleplug.
It provides rust static library, C dynamic library and node.js module.
c examples is an example about C to use it.
rust examples is an example about Rust to use it.
electron example is an example about Electron to use it.
For USB serial communication, you can use the usbd-serial crate. It provides a simple and efficient way to communicate with USB serial devices.
To add it to your project, include the following in your Cargo.toml:
[dependencies]
usbd-serial = "0.1.1"For more details, refer to the usbd-serial documentation.
The deskmsg_c library provides a C-compatible API for the core Rust functionality. It can be integrated into C/C++
projects using CMake.
Prerequisites:
- Rust (latest stable, with Cargo)
- CMake (version 3.15 or higher)
- C compiler (e.g., GCC, Clang, MSVC)
Building deskmsg_c:
- Navigate to the
deskmsg_cdirectory. - Run
cargo build(for debug build) orcargo build --release(for release build). This will compile the Rust library and generate the C header file (deskmsg_c/include/deskmsg_c.h) and shared library viacbindgen.
Integrating with a C/C++ CMake Project:
Refer to examples/c_example of how to link and use the library.
- Release deskmsg_napi to npm
- Release deskmsg lib to crates.io