Comments (5)
I have raised an issue here to see how to proceed
from rodbus.
I defined the required constants directly in the FFI module. Not ideal in terms of duplication, but I will now remove the milestone tag so it doesn't block the release.
from rodbus.
The trick is the following:
[parse]
parse_deps = true
include = ["rodbus", "tokio"]
extra_bindings = ["rodbus"]
The parse_deps
says to also read from dependent crates for stuff to export. It only exports what we use in rodbus-ffi
, so you get the Channel
(from rodbus
) and the Runtime
(from tokio
). The include
whitelists what we want to look at.
The extra_bindings
exports all the public constants and public functions from the dependent crates listed. If we want to export the constants, we need this. However, it's all or nothing AFAIK.
from rodbus.
Nice find. It'd be nice if cbindgen
could not only whitelist crates, but modules within crates... I guess I'm happy enough with duplicating the few constants in the FFI crate. I'll go update the ticket on the cbindgen project.
from rodbus.
We don't use cbindgen anymore.
from rodbus.
Related Issues (20)
- Add custom function code like tokio-modbus HOT 1
- Make TlsError opaque
- Tokio master channel tasks don't properly exit HOT 1
- Java runtime reference HOT 2
- Unable to load shared library 'rodbus_ffi' or one of its dependencies. HOT 4
- RODBUS_BACKUP_VERSION not being properly set in cmake
- Java 17 Rodbus Setup Question: Unable to load any of the included native libraries HOT 8
- Invalid JSON Log Formatting HOT 1
- Cannot connect to rodbus server HOT 6
- Runtime error when updating register values HOT 2
- FFI client can spawn tasks faster than they can be executed leading to memory build-up HOT 18
- TCP and TLS clients do not resolve DNS names HOT 1
- Read frames while waiting for a task
- Panic when creating RTU server
- TCP client and serial port state callbacks HOT 1
- Allow client certificates without role extension by configuration HOT 1
- Add IP address filter to TCP server HOT 1
- Document that Task<> returned by read/write methods may contain RequestException HOT 2
- Client connection retry does not reset to MIN after successful connection
- remove this HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rodbus.