Giter Club home page Giter Club logo

Comments (3)

jschwe avatar jschwe commented on June 9, 2024 1

To add some background:

configure_file is only available at CMake configure time, it's not a build command. It's not suitable because the bindings will not be regenerated if the rust code changes.

You need to use the most recent version of Corrosion, and use cbindgen 0.26 (or newer). If you don't have cbindgen installed at all, thats also fine - corrosion will build it for you.
The newest version of cbindgen generates a so called depfile (see mozilla/cbindgen#820), which lists which rust files the generated bindings depend on. Corrosion, then uses this depfile to tell CMake when the cbindgen command needs to be rerun.
The depfile feature requires a more recent CMake version then Corrosion v0.4 requires, so it is only used on the latest master (future v0.5 version) which already requires a sufficienlty new CMake version.

I'll be closing this issue for now, but if you still encounter this on the latest master version, the please reopen the issue and provide some more information so I can reproduce.

from corrosion.

jschwe avatar jschwe commented on June 9, 2024

Did you try the latest version on master?

from corrosion.

flaviojs avatar flaviojs commented on June 9, 2024

It works as expected after updating cbindgen to 0.26 and using master, thanks. :)

As a side note, since configure_file is only available at configure time, then cmake -E copy_if_different probably works at build time.

from corrosion.

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.