Git Product home page Git Product logo

Comments (5)

jadamcrain avatar jadamcrain commented on June 19, 2024

I have raised an issue here to see how to proceed

from rodbus.

jadamcrain avatar jadamcrain commented on June 19, 2024

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.

emgre avatar emgre commented on June 19, 2024

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.

jadamcrain avatar jadamcrain commented on June 19, 2024

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.

emgre avatar emgre commented on June 19, 2024

We don't use cbindgen anymore.

from rodbus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.